• Hello,

    i was wondering if it’s possible to use the_content to output a part of a page. For example.. let’s say i have a page (about-us) with 4 blocks of text, all wrapped in P tags with ID’s:
    <p id=”section1″>section 1 text</p>
    <p id=”section2″>section 2 text</p>
    <p id=”section3″>section 3 text</p>
    <p id=”section4″>section 4 text</p>

    Is there a way I could use the loop with the_content and modify it to just output the text from section 2? And on the same page use the same loop but just with the text from section4?

    Thanks in advance!
    Greetings, Peter

Viewing 1 replies (of 1 total)
  • Thread Starter paaater

    (@paaater)

    Happy to say I found a solution ??
    Thought I’d share it with you guys in case anyone is interested.

    I used Rob Searles his function, and modified it a bit here and there.
    https://www.robsearles.com/2009/07/wordpress-multiple-content-columns/

    Now via the <!–more–> tag I am able to split the text in my pages into smaller chuncks of text. Via the modified function the divs get assigned a couple of unique ID’s and classes, which give me the opportunity to use the chuncks of text in tabs, columns, or other layouts like flowcharts etc which works for me at the moment ??

    If anyone has a better suggestion I offcourse would like to hear it ??

Viewing 1 replies (of 1 total)
  • The topic ‘Use the_content for parts of a page’ is closed to new replies.