Tag Info

New answers tagged

0

Assuming you are on Linux, you need to make some changes in apache2.conf file stored in /etc/apache2 directory. Open the file with root permissions, you will find the code given below in the file. <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> Here just change the ...


0

I had the same issue and found a solution. From what I learned so far, there might be two causes to this problem: WP doesn't recognize your rewrite rules because they are not cached yet. You can check this by dumping get_option( 'rewrite_rules' ); and if your rules did get cached, then they'll be in that option. To ensure your rewrite rules are cached, ...


0

I had the same issue and found a solution. From what I learned so far, there might be two causes to this problem: WP doesn't recognize your rewrite rules because they are not cached yet. You can check this by dumping get_option( 'rewrite_rules' ); and if your rules did get cached, then they'll be in that option. To ensure your rewrite rules are cached, ...


0

Finally, I've found an answer. Not sure if it's specific in my case or it's a general WP issue but default value for posts per page set up in WP admin (General > Reading > Maximum number of posts per page) should be less than value for posts_per_page parameter for custom query. In my case, I've changed in WP options value to 3 and for other page changed this ...


0

You may want to take a look at this related issue: WP-PageNavi gives me a 404 when using WP Query Some users mentioning that the page name cannot be the same as the post type you are querying, and others that it may be a conflict with another plugin you are running.


-1

set a permalink structure on settings> permalinks . WordPress needs to create the .htaccess file.


0

WordPress doesn't receive those requests, so the server 404 displays. If you want WordPress to handle all 404s, use mod_rewrite Pretty Permalinks rather than PATHINFO permalinks. The requirements are detailed in Using Permalinks.


0

Fixed. Maybe an Apache update or something did this to me. I changed AllowOverride None to AllowOverride All in /etc/apache2/apache2.conf for the /var/www folder.


0

i have also faced such kinds of problem when i upload the project to server and for fixed this i have followed below steps : change permalink and save it again. if code display below then replace with that code enable rewrite_mode and for doing this is have followed the steps from this article : ...


0

Using below code you can directly redirect on home page when 404 call, please remove all code from the 404.php file and add below code. <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: ".get_bloginfo('url')); exit(); ?>


0

As was mentioned in a comment, template_redirect would be an appropriate hook for intercepting a 404 before the template is loaded. function wpd_do_stuff_on_404(){ if( is_404() ){ // do stuff } } add_action( 'template_redirect', 'wpd_do_stuff_on_404' ); Refer to the Action Reference for the general order of actions on the front end. The ...


0

Instead of going to the page and changing the slug, if you simply go to the page and save again, it will be fine. That's after you try resetting the permalinks and all that.



Top 50 recent answers are included