WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Need Help - Sending /products/name/ to /products/ Page with Variable = "name" (2 posts)

  1. FireStorm Plugins
    Member
    Posted 6 years ago #

    Hey everyone,

    I'm creating a products plugin and I'm fairly new to WordPress so I have hit a roadblock :)

    I need to setup a plugin that tells any sub-pages of /products/ to go to the /products/ page with a variable with the sub-page name. The database will then be called which will allow the /products/ page to grab the product info and display it. Meanwhile, the address bar would still display http://www.mysite.com/products/name/

    Is this possible? Unfortunately, editing the htaccess file is not possible so it would have to be in plugin form.

    How could I go about accomplishing this? I know there are ecommerce plugins out there but I'm looking for something more custom.

    Thanks in advance for your help! :)

    Wes

  2. FireStorm Plugins
    Member
    Posted 6 years ago #

    I ended up figuring this issue out by using $wp_rewrite. It was quite simple actually.

    Do a search on the forums for $wp_rewrite if you are looking to do the same thing as there are a few posts (with examples) on how to accomplish this.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.