Build optional prefix for both post and pages, based on meta

by Кристиян Кацаров   Last Updated October 19, 2019 22:08 PM - source

Is it possible to build optional url prefix using add_rewrite_rule for both post and page types? There is name and pagename parameter and I am quite confused.

What I am trying to achieve is an optional prefix based on meta, e.g. new/%slug% which works for both post types and only when the post type has the meta information new. Thanks for the help in advance!



Related Questions



Custom Redirect Rule For My Site

Updated March 01, 2019 14:08 PM


WordPress Rewrite Rules Causing JavaScript to Not Load

Updated October 28, 2018 03:08 AM