Duplicate Content Issue with WordPress Permalink Structure and Primary Categories

function get_current_post_ID() { $postid = get_queried_object_id(); $post_url = get_permalink( $postid ); //wp_redirect( $post_url ); if( has_category(”, $postid) && urldecode(‘https://’.$_SERVER [‘HTTP_HOST’].$_SERVER [‘REQUEST_URI’]) != $post_url ) : wp_redirect( $post_url, 308 ); exit(); endif; } add_action( ‘template_redirect’, ‘get_current_post_ID’ );

Add custom css to specific user

In the code that you proposes the selector only works if previously added the attributes in the HTML. It is easier if you load a specific stylesheet just for certain users: Create a new CSS file with the specific styles, something like specific.css .just-for-user-b { color: #ffffff; } Add this code to your functions.php <?php … Read more

PHP Warning: Constant WP_CONTENT_URL already defined

You’ve got that constant defined in two places. The error message tells you where it is first defined: Warning: Constant WP_CONTENT_URL already defined in /var/www/html/my-website/wp-config.php on line 11 Look at line 11 of the wp-config.php file. I’d bet that you’ll find that constant defined there.