• Hello friends,

    Paragraphs presented within the_content by default has no CSS class, I would put a class on a specific point, can anyone help me do this?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • define ‘specific point’.

    once you know which paragraph html tag you want to target, this could be possible using a filter function on ‘the_content’ –
    https://codex.www.ads-software.com/Plugin_API/Filter_Reference

    Thread Starter thiagonunes

    (@thiagonunes)

    alchymyth, regarding the link you posted, I do not know exactly which function to use to add the class, could you explain more specifically?

    Thanks

    define ‘specific point’.

    please specify ‘specific point’, as any suggestion will likely depend on where you want to insert the css class.

    Thread Starter thiagonunes

    (@thiagonunes)

    ok, I have the following html structure formed by a loop

    <section id="post-205" class="post-205 post type-post status-publish format-standard hentry category-destaques">
         <h4>
             <span> Xbox 360 </ span>
         </ h4>
         <img alt="" src="https://localhost/roxgames/wp-content/uploads/2012/09/xbox36012.jpg">
         <ul class="desc-destaques">
             <li> </ li>
             <li> </ li>
             <li> </ li>
             <li> </ li>
         </ ul>
         <p> 799.00 </ p>
         <form method="post" action="https://pagseguro.uol.com.br/checkout/v2/cart.html?action=add" target="pagseguro">
    <input type="hidden" value="CC104BD80909378664BE1F92F93907F6" name="itemCode">
    <br>
    <input type="image" alt="comprar" name="submit" src="">
    <br>
    </ form>
         <p>
             <a class="more-link" know href="https://localhost/roxgames/?p=205#more-205"> + </ a>
         </ p>
    </ section>

    The content inside the tags h4, img, ul and <p> 799.00 </ p> are generated by the plugin Advanced Custon Fields, and the contents of the tag “<form>, and the paragraph below is inserted into the resulting content wysiwyg editor which appears on page via the_content ().

    I would like to add a class just for the tag “form” and the paragraph below.

    Thanks for the help!

    Thread Starter thiagonunes

    (@thiagonunes)

    can anyone help?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add class in paragraph inside the_content’ is closed to new replies.