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

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

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


Updated April 27, 2019 14:08 PM

Updated March 01, 2019 14:08 PM

Updated September 07, 2018 15:08 PM

Updated October 28, 2018 03:08 AM

Updated October 10, 2017 07:08 AM