• Resolved marklb98

    (@marklb98)


    Hi

    I am using this plugin to organize custom posts, post title has a </br> to separate undeline a part of the title but this plugin can’t render it and it appears the br on title

    How can i fix it?

    Regards

Viewing 1 replies (of 1 total)
  • Plugin Author Code Amp

    (@codeamp)

    Hi Mark

    I’m afraid this won’t be fixable.

    Essentially, all the characters in a post title are supposed to be displayed on a website.

    2 main reasons for this:
    – What if a user wants to enter special characters in their title – we must display them
    – Security – all data must be escaped before displaying, and this is why you see the html output instead

    Another thing to consider is, what would be the page title (in your browsers title) when adding in these codes? I guess they should be invisible… but they are also not supported in the post title.

    All in all, this is not supported by WordPress, and also because we match that, our plugin.

    What you could do is (if you can do some coding) is to use a PHP filter to change the the text inside the element.

    The hook for that can be found here:
    https://customlayouts.com/documentation/action-filter-reference/

    You would want to use the one:

    add_filter( 'custom-layouts/element/render_output', 'cl_element_render_output', 10, 2 );
    

    Then you can completely change the html / text inside any element programmatically.

    I realise that might not be what you wanted exactly, but these are the current limitations regarding this request.

    All the best
    – Ross

    • This reply was modified 2 years, 11 months ago by Code Amp.
    • This reply was modified 2 years, 11 months ago by Code Amp.
Viewing 1 replies (of 1 total)
  • The topic ‘Html code on title’ is closed to new replies.