• I am working on a non-wordpress website where I have used the loop to get posts from different categories on the different pages. Is it possible to use the loop to get “pages” the same way as you get posts and how would you to it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Check out the get_pages() function.

    Thread Starter mattisn

    (@mattisn)

    I am sorry but I am not a very good coder, how would I use the get_pages function in my loop to get (for example) a page named “about”

    would it be something like:
    <?php get_pages(“page_name=about”) ?>
    and would I need more code aswell to show the content?

    Thanks alot

    I don’t understand what you’re trying to do. If you just want to show one particular page, why don’t you just link to that page?

    Thread Starter mattisn

    (@mattisn)

    I have integrated wordpress into my existing website, so we are not talking about a template here (my own index and stylesheet). On my front page I am using the loop to get the posts from wordpress (which is on the same server), however, I also need to get the content from pages the same way I get post content using the loop. Can I modify the loop to get content from pages and not from post’s.

    Thanks alot

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is it possible to get pages with the loop’ is closed to new replies.