• There may be a better way to do this but..

    I am trying to develop a page that shows a list of excerpts from a category pertinent to the page, then content below the list of posts.

    The trouble I am having is I have a ton of categories and I will have more coming in. I am trying to avoid having to make a new page template for each.

    Is there a way I can make some kind of input box to choose the category variable on the page editor so I can assign the category for each page to display?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Just a custom field with a value of the category slug you want to loop through before the page content. In the page template you can just run a WP_query with the custom field value, reset the query at the end and then run the page loop.

    Thread Starter spencerpad

    (@spencerpad)

    Awesome, thanks.
    for some reason I thought custom fields were for posts only.

    Not at all. If you don’t see the ‘custom fields’ section in one of your pages just toggle the ‘screen options’ tab at the top right of the page and check the ‘Custom Fields’ box.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘user variable input for pages’ is closed to new replies.