New answers tagged

1

Does wordpress have any built-in settings for doing this? Most likely your host will have an option on your cPanel for custom Error pages. Something along the lines of: If that is not the case, please have a look at this older question: How to create custom 401, 403 and 500 error pages? EDIT 1: Also at this one: ...


0

This is a great tutorial about Handling 500 & 503 Error Pages in WordPress. If you need a custom 503 Service Unavailable Page checkout this FREE 503 Error Page for WordPress


0

With the Basic WP .htaccess rules it should at least be taking you to /site and /anothersite on the WordPress install and driving a 404. However it appears your server is handling 404 errors without passing them to WordPress. You may be able to add a custom php5.ini file with the directive cgi.fix_pathinfo = 1. Alternatively adding this to the top of your ...


0

If anyone's interested, the solution was quite close, I only had to specify the rewrite rule with &post_type=film : add_rewrite_rule( 'projections_dvd/([^/]+)/?$', 'index.php?name=$matches[1]&post_type=film&is_projections_dvd=1', 'top' ); I also changed the query vars to make it simpler : function wpd_query_var( $query_vars ) { ...


1

Got it to work, changing the regex from (.+) to (.*) Maybe helpful for others searching same rewrite on search and pagination. add_rewrite_rule('discover/interiors/interior-results/(.*)/page/([0-9]{1,})/?', 'index.php?pagename=discover/interiors/interior-results&tag1=$matches[1]&paged=$matches[2]', 'top' ); ...


0

The way htaccess rewrite works (wp uses this), this drives the very first match on the list to load the targeted rewrite of URL. So answer to your question is YES, keep longer/elaborated rules at top, followed by less longer structures; alternatively you can write conditions (rewrite cond ) to match rules per blockwise.


0

Updating the rewrite-rules manually as follows worked for me: function gallery_rewriterules( $wp_rewrite ) { $new_rules = array( "hochzeitsfotografen/([^/]+)/([^/]+)/?([0-9] {1,})/?" => "index.php?fotograf=".$wp_rewrite->preg_index(1)."& gallery=".$wp_rewrite->preg_index(2)."&img=".$wp_rewrite->preg_index(3)); $wp_rewrite->rules ...


2

Setting has_archive to true causes WordPress to generate a rewrite rule for the archive using the rewrite slug, which is not what you want in your case. Instead, explicitly specify the archive slug as a string and the correct rules will be generated: $args = array( 'has_archive' => 'courses', 'rewrite' => array('slug' => ...


0

With your desired permalink URL structure ... WordPress is automatically handling the creation of rewrite rules for what you entered (courses/%course-type%) for your Post Type slug. Of course you have to modify the Post Type link to substitute the place holder with the actual value (as you've already done). However, WordPress isn't expecting that type of ...


0

There's a known issue with LearnDash and bbPress/BuddyPress which can cause this, I ran into the same thing myself. Maddening! And it's proportional to the number of BP events being generated so the more user activity you have, the more it occurs. Details in the LearnDash support site here. I used the following code to fix: // Fix for LearnDash causing ...



Top 50 recent answers are included