Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #99166
    Jason
    Participant

    Thanks for the great theme! I just purchased the pro version to get more featured content options for the home page, and I like it. Is it possible for me to add html content to the featured content image description text for styling, linking, etc.? For instance, when I mention a book, I would like to italicize the title. And, I would like to link some text. I am well versed in html and css, but nothing seems to work in this featured content text area except text.

    By the way, I would have used the featured page option to get html content, but that does not bring in the featured image, and I really want images with text in these columns on the home page.

    Are there shortcodes available to add this functionality, or some other way to at least stylize and link text?

    Thank you for your help!

    #99181
    Mahesh
    Participant

    @jason9617: Thank you for using Clean Box Pro theme. Well, the content only allows plain text and strips out any html content or other beside plain text. So putting a link in content is not possible. However, you can put the custom link in Link option which will link the image to that very link. And for styling, you can always use Custom CSS. Go to Dashboard=> Appearance=> Customize=> Theme Options=> Custom CSS box and add the following CSS:

    #featured-content .entry-title {
        font-style: italic;
    }

    Regards,
    Mahesh

    #99208
    Jason
    Participant

    Thank you for letting me know. If you keep a list of feature requests, please add the ability to stylize specific text words and also add multiple links within text content area. It would be extremely helpful for me. Thank you!

    #99256
    Mahesh
    Participant

    @json9617: Okay another thing what you can do is, customize the theme a little bit so you can allow some HTML in the content. Edit inc/customzier-includes/clean-box-customizer-featured-content-setting.php file, go to line 307 and 321 and change
    'sanitize_callback' => 'sanitize_text_field',
    to
    'sanitize_callback' => 'wp_kses_post',
    Since this is direct edit in the core theme file, you’ll need to make sure you do these changes everytime you update the theme.

    Regards,
    Mahesh

    #99308
    Jason
    Participant

    Thank you! That did the trick. I decided to edit line 321 as well so that I could add html to the main text description box, instead of the title area.

    #99331
    Mahesh
    Participant

    @jason9617: Thank you for your appreciation. Have a nice day!

    Regards,
    Mahesh

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘HTML code in featured content text’ is closed to new replies.