My recommendation is to register a custom post type. You can call it products
, and then all posts placed under Products will get the http://domain.com/products/some-product
rewrite. Once it’s its own post type, you can specify a custom template for it, single-product.php
, and you can add any custom fields, classes, etc. from there.
Related Posts:
- Change url to posts if they have custom tax only
- Custom Rewrite Rules Not Sticking
- How to change/rewrite the lost password url?
- How Can I Have A URL Changed Based on the Originating URL?
- Adding rewrite rule dynamically
- Display Externally Retrieved Data within a Custom Template
- Rewrite rule and display of post
- Custom permalink for attachment
- Change URLs in default WordPress slider to relative from absolute
- Need help with add_rewrite_rule
- Custom theme hooks / filters – passing arguments
- Add Rewrite Rule for custom page
- add_rewrite_rule, plugin activation and plugin deactivation
- Disable wordpress pagination URL rewrite for specific page
- How to use Post Custom Metadata in Post Titles and Post Permalinks
- What params are available with the_content filter?
- How to hook wp_list_pages?
- Don’t replace “|” with Empty String (“”) when generating slugs from title
- How to exclude/filter a tag from get_the_tag_list()
- WordPress Network on IIS7/SQL Server – Rewrite Issues
- Custom comments
- Filter the blog’s title without using global variables
- Rewrite url / permalink for default archive – yearly / monthly
- user_has_cap filter allows edit but will not allow save
- Add filter to wp_dropdown_pages() or wp_dropdown_categories() – no select container?
- Custom URL for each product variation – rewrite rules
- Hook different functions to the same filter conditionally OR Pass additional arguments to existing filter?
- Permalinks, Rewrites, Get Variables, Oh My!
- Search results sorted by post types
- where to apply “apply filters” and other Sanitization Functions
- Remove “/page/1” from the URL
- hard flush_rewrite_rules() not regenerating .htaccess
- Add guid filter to attachment in media library grid mode
- Pass parameter to the upload_dir filter
- Filter or Hook to catch pre-rendering of post content
- Rewrite Rules Are Redirecting and Not Passing VARs
- check to see if hook is available
- WordPress rewrite rules don’t need ^?
- Permalinks: Page Not Found
- Filter users by custom colum not meta key
- How to allow users to view pending posts of a specific custom post type?
- Remove filter callback: method in class
- add_filter(‘the_content’, ‘…’) stops pagination from working
- Is a permastruct possible on pages?
- How can I exclude tags from category_rss function?
- Custom permalinks with hierarchical taxonomy – getting PHP warning
- How do I use remove_action on an add_action that uses an array?
- Change the default 10-day expiration for the password protected pages cookie
- Add content as soon starts
- How can I change the language of automated Mails?
- How can I replace an oEmbed URL in post with actual embed HTML
- Replacing a deprecated filter ‘woocommerce_get_price’ with ‘woocommerce_product_get_price’
- How do you get specific tags from the_content?
- Add a filter inside an action init
- Best way to trigger rewrite rules
- Is it possible to apply_filter on a wp_ajax_ action?
- Apply filters with multiple filters
- Trouble with question mark in rewrite rule
- Using add_filter to prepend content, result is out of order
- get_posts() interrupt because of filter
- Disable sanitize_file_name on upload without modifying functions.php
- Rewrite rule not passing variable
- Filter Media by attached page or blog post in Library
- How to stop DOMDocument destroying embeds?
- Custom route and extract data from slashes and parameter
- How to modify image caption in posts?
- Extend Nonce Lifetime for Specific Nonce Creation
- Run `wp_insert_post_data` on all posts
- Mystery line break
- Using a template file for a specific custom URL
- Consult array data in REST API Filter
- WordPress add_filter to post_date
- create a shortcode with acf including a filter
- Having issue with dynamic data within restrict_manage_posts function
- add_rewrite_tag broke permalinks that doesn’t use that specific tag
- Prefix only some posts with a custom prefix
- Overriding Generated Attachment Post URL
- Pagination while keeping the filters
- Rewrite rule not redirecting correctly
- Filter on the day of the week from timestamp
- using filters on the function from class
- Put data in my-account/view-order/id/ page
- Hook inside a hook
- Filter WordPress Archive Widget to exclude posts with specific custom taxonomy term id
- WordPress Pagination Custom Rewrite Rule for Pages
- Password protected Page add_filter to change the text doesn’t work
- add_filter not adding the filter
- wp_get_attachment_link filter not working
- How would I remove an inline googleAPI font script in the the parent theme header.php?
- Additional .htaccess rules based on wp page
- URL Rewriting in WordPress
- Joining tables not working in the post editor page
- Auto append text after the title?
- add_rewrite_rule not working in Custom Post Type UI Plugin
- Filter and manipulate the get_current_user() function
- add_filter(‘the_content’, ‘method’) does not trigger my custom method
- Replacing text using add_filter
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Change password reqts with NO plugin without breaking resetpass link?
- How can I conditionally add the filter option_home?