WordPress CPT & Custom Taxonomy with the SAME Permalink Structure

Permalink Structure Function This function constructs the permalink for the ‘guide’ post type, including all hierarchical terms, with added spaces for style consistency: function xx_guide_permalink_structure($post_link, $post) { if ( ‘guide’ === $post->post_type && $terms = get_the_terms( $post->ID, ‘guide-category’ ) ) { usort( $terms, function( $a, $b ) { return $a->parent – $b->parent; } ); // … Read more

Custom permalink for ‘post’ not working

Here are two ways to fix this: Use a Prefix for Single Posts: Modify your permalink structure for posts to include a prefix specifically for single posts. For example: guide/news/post/%postname%/ This way, single post URLs will look like site.com/guide/news/post/your-post-name/ and won’t match the blog list page pattern. Use a Separate Permalink Structure for the Blog … Read more

How to make 2 (or more) custom post type post pages sit under the same slug?

You were getting /video-demos-tours/post-name instead of /resources/post-name because the following line in your theme_build_post_args function is setting the rewrite slug to the post type slug (video-demos-tours): $args[‘rewrite’][‘slug’] = $slug; So you should fix that, but as for how, that is up to you. But then, although fixing that would give you the permalink structure you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)