Using taxonomy term in CPT permalink – Pages 404’s

Ended up with commenting out line 4 and changing the filter into this: add_filter(‘post_type_link’, function ( $post_link, $post, $id = 0 ) { if ( ‘project’ != $post->post_type || ‘publish’ != $post->post_status ) { return $post_link; } $post = get_post($id); if (is_object( $post ) && $post->post_type == ‘project’ ) { $terms = wp_get_object_terms( $post->ID, ‘department’ … Read more

Missing Page, But Still Exists In Preview

It certainly sounds like a caching issue. Even if you disable W3 Total Cache, often it keeps cache code in your wp-config.php file and .htaccess. Purge all that code and see if the problem persists. Also, make sure your web host does not have server caching. Many “managed” platforms have a built-in cache (eg. WP … Read more

WordPress post-name permalink redirects to site.com

Try separating the second location block: location /blog { alias /var/www/wordpress-site/; try_files $uri $uri/ /blog/index.php?$args; } location ~ \.php$ { fastcgi_split_path_info ^(/blog)(/.*)$; include snippets/fastcgi-php.conf; include fastcgi_params; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; fastcgi_param SCRIPT_FILENAME $request_filename; } Hope this helps!

Trouble with CPT Child 404

You can’t have both a page and a Custom Post type with the same slug, in your case videos. See: https://core.trac.wordpress.org/ticket/38599 for a ticket recommending this be changed in core. A few solutions: Change either the page or the post type to video instead of video Follow the Template Hierarchy and create a archive-videos.php with … Read more