Tag Info

New answers tagged

1

There might be better ways using filters or apache/nginx rewrites, but here are two ideas to consider from the admin UI point of view (untested): Idea 1: You can always visit /wp-admin/options-general.php change the whole the site url: but I don't think you're looking for that, since this will also change the home url. Idea 2: You might therefore ...


1

From performance point of view what takes time is matching URL against generated (and stored persistently so it's not rebuilt continuously) list of regular expressions. Since URLs are (most of the time) insignificantly short in text volume the amount of those regular expression rules has most impact on performance. Unless you generate unreasonably many ...


0

You don't need to specify a pagename, if you want to replicate a post type archive set post_type instead. function add_events_rewrite_rules(){ add_rewrite_rule( 'events/date/([^/]+)/?$', 'index.php?post_type=events&_events_date=$matches[1]', 'top' ); } add_action( 'init', 'add_events_rewrite_rules' );


0

I simply changed it to this, and it works! add_action( 'init', 'addMyRules' ); function addMyRules(){ add_rewrite_rule('^people/([^/]*)/?','index.php?author_name=$matches[1]','top'); add_rewrite_tag('%author_name%','([^&]+)'); flush_rewrite_rules(); }


1

Instead of index.php/reco/?b=$1, try this: "$wp_rewrite->index?pagename=reco&b=" . $wp_rewrite->preg_index( 1 ) You should also append a $ to your reco/([^/]*)/? regex to ensure the rule only matches the entire path, and not just the beginning. Then flush your rules afterwards (just re-save your permalink settings in admin). Update: Try using ...


2

WordPress has a number of implicit assumptions with regards to using SSL. Specifically, if you are using force_ssl_admin, and the "front" of your site has the same domain as the "back" does, then it assumes that your entire site is actually accessible either via http or https. This happens in a few different places. Most notably, the Theme Customizer ...



Top 50 recent answers are included