• Resolved BlueLaw

    (@bluelaw)


    Hi All!

    I have a HTML website. I want it to have pages that feature content from my WordPress pages, but only the content (not the whole wordpress page, including sidebar, header etc.)

    Is there a piece of code I can place into a cell on a HTML page that “gets” the content off a wordpress page.

    Then when I update the text within the wordpress page, it will be updated on my other site (keeping it up to date).

    (I was going to build a new theme from scratch, but I’m trying to design a very visual website that’s layout changes often and we’ve decided there’s no way to get a theme to do what we want. It’s only the “Latest News” part of the site which will have regularly changing content, so I thought I could have a news page, that is displaying the content from a wordpress page that I’m keeping up to date. I understand I’m going to need to use PHP here)

Viewing 4 replies - 1 through 4 (of 4 total)
  • and we’ve decided there’s no way to get a theme to do what we want

    You’d be very very unique if that’s truly the case.

    To your question though:
    Check here https://codex.www.ads-software.com/Creating_a_Static_Front_Page#Integrating_WordPress

    See the “mini-loop” section.

    Perhaps read up on The_Loop as well, if you need more context.

    Thread Starter BlueLaw

    (@bluelaw)

    Unique, perhaps, but then perhaps it’s just bad design. We’re not having the same footer, header, etc etc per page. Like I said, that’s somewhat of an experiment because it may well be tricky to navigate.

    I’ll go have a look at these links, thanks a lot for getting back to me. If I don’t understand a word of them and blood starts to drip from my nose, I’ll get back on and ask you.

    Thanks again!

    There is also a “misnderstanding”: you will not be able to display ‘news’ from a WP Page. You need posts! And that can be done in several ways:
    – using a recent_posts plugin in a non_WP file that is WP-aware;
    – using your own RSS feeds
    – just using The Loop in your non-WP file

    And just for the record: I can always get a theme to do exactly what I want…

    Thread Starter BlueLaw

    (@bluelaw)

    You can always get a theme to do what you want!

    Haha, what I’m going to do is design the site entirely in html, not using any element of WordPress, then I’ll return to this very forum and see what we all think about putting WordPress under the hood.

    I’ve enjoyed using WordPress so much, and I find it so accessible, it would be a shame to lose it.

    So lets close this thread for now and I’ll be back.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘A Piece of “Get Content” Code – plus how to use it!?’ is closed to new replies.