WPML – 404 Error when I try to pass GET parameters in my “different languages in directories” installation

The problem your GET param is using the same name as the query var for your custom post type. $link = $link_aqui_se_sirve.’?’.$establecimientos_cpt_name.’=’.$tax->slug; With that URL, WordPress is expecting the value of the $establecimientos_cpt_name parameter to be a post slug. Instead you are giving it a taxonomy slug. This will give you a 404 unless you … Read more

When I remove get_header() from 404 page, my css doesnt work

Of course it doesn’t. When you remove get_header() you also remove the code that loads the CSS files, not to mention that you remove large blocks of necessary HTML markup. The template you’ve posted above is very, very broken. You’ve also left out get_footer() which will most likely leave your markup broken as well. Instead … Read more

URL Change – Check if Post Exists Before 404

function checkArtist() { $page = get_page_by_path($_SERVER[‘REQUEST_URI’].”https://wordpress.stackexchange.com/”,OBJECT,’artist’); if($page){ header(“HTTP/1.1 301 Moved Permanently”); header(“Location: /artist”.$_SERVER[‘REQUEST_URI’]); } } add_action( ‘wp’, ‘checkArtist’ ); I add a custom hook using wp which as the article says: This hook is one effective place to perform any high-level filtering or validation, following queries, but before WordPress does any routing, processing, or handling. … Read more

Page not found – Wamp green, phpmyadmin working

My first step would be to turn on WP_DEBUG in your wp-config.php file. Edit wp-config.php and add the following lines: define( ‘WP_DEBUG’, true ); Then visit your site’s admin (example.com/wp-admin) and see if an error appears. More than likely the plugin you just added broke the site, so you can go into your local filesystem … Read more

wp-json Returns 404 Upon Plugin Activation

I found the solution and will post here on the off-chance it helps someone in the future. The bottom line is there was a typo in a function that responded to POST requests. I narrowed it down to one file by disabling portions of my plugin in the activation class. By doing this I determined … Read more

Custom JSON feed rewrite

The AJAX request would query for the dates it requires to display. With Lazy fetching set, if you switch from month to week or day views it won’t bother making another request, since it doesn’t need to. This is outlined in the fullcalendar documentation. As for using this method, see this question on how to … Read more