• Resolved mjcny

    (@mjcny)


    Hi, I am new to wordpress and am trying to put together a site for an organization I volunteer with.

    One of our projects is to put on our website a list of local businesses whose practices fit with our mission.

    I would like to create a static page for each business.

    Then I would like to create series of index pages that will display a list of all of the business that are in a specific location or of a specific type (ie restaurant vs. store).

    Ideally on the index page, I would display just the name of the business (and possible the address) and the name would be a link to the page that would have a more detailed description.

    This is a list that is going to be constantly growing, so I would like the index pages to automatically pull the most uptodate information from the static pages.

    I was looking at using custom taxonomies and query_posts function to create the index page, this almost works, but it displays almost the entire static page as a post, and I want just the title, or maybe just the title and first few lines.

    Can anyone suggest the best way to do this? Or tell me how to get the query_post function to only display the title/first few lines?

    Thank you very much for your help
    MJC

Viewing 3 replies - 1 through 3 (of 3 total)
  • query_posts does not actually display anything, it just creates an array of posts to be processed.

    You can use the WP ‘more’ function in pages by adding a line before the query_posts to turn it on: <?php global $more; $more = 0; ?>

    Then in the while(have_posts()) loop, use the_content(' Read more...'); or similar.

    Edit each page and add the ‘more’ tag.

    Thread Starter mjcny

    (@mjcny)

    thanks that helped!

    Great! Now, please use the dropdown at top right to mark this topic ‘Resolved’.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘create a page that lists other pages based on specific fields’ is closed to new replies.