I have the following code: <?php function ex_rewrite_rules(){ //discography query variable rewrite add_rewrite_rule( 'artists/([^/]+)/discography/?$', 'index.php?album_artist=$matches[1]&discography=yes', 'top'); //albums rewrite rule add_rewrite_rule( 'artists/([^/]+)/discography/([^/]+)/?$', 'index.php?album_artist=$matches[1]&discography=yes&albums=$matches[2]', 'top' ); //songs rewrite rule add_rewrite_rule( 'artists/([^/]+)/discography/([^/]+)/([^/]+)/?$',...
I’m building a site where every state and city in the US has a landing page. I have a database of every city, state, and zip code, set up...
I’m trying to write a general endpoint that loads a template. It works as expected with the small exception that the returned header is 404 – Page not Found....
I am working on a webinar plugin that uses a custom post type to display the webinar pages. Those pages could be register, thank you, countdown, live etc. depending...
I have a custom tag-search feature, which allows people to search multiple tags to return relevant posts. Say they want to see posts that are tagged both ‘WordPress’ and...
I want to check for an appropriate template in the theme folder before falling back to the file in my plugin directory. Here’s my code: add_filter('template_include', 'sermon_template_include'); function sermon_template_include($template)...
I would like to get some opinions regarding the best practices for developing WordPress plugins that provide theme integration. In order to make sense as I ask this question,...
I’m wondering if there is any way to use get_template_part() with folders? My main folder has a lot of files now because I put every re-usable element in a...