Passing a parameter to a page (2 posts)

  1. Ziyphr
    Posted 8 years ago #


    I would like to pass a parameter to my page template.

    For example I create a page called 'reviews' and then filter these by type, based on a $_GET variable. E.g.

    site.com/reviews/ (main reviews page)
    site.com/reviews/dvds/ (show only dvd reviews)

    The only bit I'm stuck on is letter the second link reach the reviews page without returning a 404.

  2. Ziyphr
    Posted 8 years ago #

    As it has been 2 days I will try to explain further.

    At the moment WordPress has built in functionality to convert site.com/reviews/page/2/ to something similar to site.com/reviews/?paged=2. Effectively 'page' is simply a variable and 2 is the value. I would like to have a variable called 'type' with a string value.

    When I try and use my own variables instead of the standard 'page' variable, I get a 404.

Topic Closed

This topic has been closed to new replies.

About this Topic