WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
How to allow html markup in featured posts text (3 posts)

  1. edbeckmann
    Member
    Posted 5 months ago #

    Is there a way to keep markup ( <h3> etc )in the text for featured posts?

    I can enter markup in the customize sidebar (home page > featured text one) and the live preview displays the result I want (it happens to be a bulleted list but the principle is the same). However when I save and preview the page, the markup has gone - the text is simply wrapped in a <p> </p>.

    If I leave the text blank the sidebar should pick up the excerpt from the relevant post - that excerpt has been populated with code that is marked up. However, the final result is the same - no formatting.

    Looking at the database, the field 'tc_theme_options' in table wp-options has the code sanitized to > or <, so the problem must lie in when the options are saved.

    Looking at customizr/inc/admin/class-admin-customize.php, line 224 seems to apply function tc_sanitize_textarea to the options. I'm guessing that this is what nobbles the formatting.

    Sadly this is where my coding skills end - is anyone able to help me remove the sanitize instruction from the text area, or tell me why this could never work?

    Apart from that, an absolutely brilliant theme! :-)

    Many thanks.

    Ed

  2. ElectricFeet
    Member
    Posted 5 months ago #

    I've put it on nikeo's to-do list: http://wordpress.org/support/topic/featured-page-text-line-break

    But there are quite a lot of other thins on the list too.

    If you need a faster fix, there is functionality in the code to switch off the sanitizing if qTranslate is installed (so you can add multilingual shortcodes in the featured texts). If you fool that condition into thinking you have qTranslate, it will probably work.

    (Not at my desk, or I would find the file/line for you.)

  3. edbeckmann
    Member
    Posted 5 months ago #

    ElectricFeet

    Thanks for being so fast with a reply.

    I have had a brief look, moved the relevant file /inc/class-fire-init.php to the child theme and tried a few changes, so far with no success.

    > Confirmed the child file works, with a harmless change
    > Commented out the opening and closing if statements on lines 412 / 458
    > Copied lines 442 - 447 to new lines 317 etc.
    > Installed and activated qTranslate plugin
    > Each time made a change to the code I altered customize > front page text and re-saved

    I will have a look later today, because the last step should certainly have worked.

    Ed

Reply

You must log in to post.

About this Theme

About this Topic