2

I think, there are two things to be resolved: 1) You need that posts (and other post types) also followed that command, so use both: add_filter( 'post_link', 'remove_parent_category', 10, 3 ); add_filter( 'post_type_link', 'remove_parent_category', 10, 3 ); 2) but then categories also need to have changed url, so use: add_filter( 'category_link', '...


2

WordPress sites usually use body_class(), which adds CSS classes to the <body> tag. If you inspect the body element itself, most sites will show you something like <body class="page-template page-template-tpl-events page-template-tpl-events-php page page-id-1168 page-parent page-child parent-pageid-378"> You can tell from these classes that ...


1

The problem in your code is the lack of proper rules. You add 'rewrite' => 'CPT/%states%' in register_post_type() arguments. This causes that the rules generated for pathologists post type begins with pathologists/%states%/ and the address pathologists/alabama/ (pathologists/{term}/) will not be matched. More importantly, all posts from the custom ...


1

You can just type it in, no need to do anything special.


1

The get_attached_file() function returns the path to a file based on the attachment ID: $FeaturedImage = get_attached_file( get_post_thumbnail_id() ); Getting the path to a specific size is more complicated. WordPress stores the filename for resized versions of the images in as attachment metadata, that can be retrieved with wp_get_attachment_metadata(). ...


1

Go into the wp-options table. Change the URL of your site in two places to https://www.example.com . Or go into the Admin, Settings, General, and fix the URL there. (The setting on that screen reads the value from the wp-options table.) Make sure there are no URL settings in the wp-config.php file. Any setting in wp-config.php for the URL will override the ...


Only top voted, non community-wiki answers of a minimum length are eligible