Highlight archive link on single.php

As your links are generated by get_archives_link(), this is the place where you have to look. Doing so, by inspecting the source , you will notice that get_archives_link() – itself – doesn’t give you the possibility to add a CSS class to make the highlighting happen. There is of course the filter hook get_archives_link – … Read more

Blog post – single.php url

This is normal. You probably have your Permalinks set to “Post Name”. You can change your Permalinks to “Custom Structure” and put ‘/news’ in there before the post title, so the “Custom Structure” field would look like this: /news/%postname%/ That should do it.

What is wrong with my WP_Query Arguments?

Use this one- ‘category__not_in’ => array( 93, 94, 95 ), instead of- ‘category_not_in’ => 93, Note: The term is category__not_in, not category_not_in. Use 2 underscores after category. Edit: You are using- ‘offset’ => 1 That forces to show posts from 2nd one (skips the first post). So, it’s showing one post less! If you use … Read more

Link from archive-page.php to single-page.php

get_the_permalink() doesn’t echo anything. It just returns a string so that you can further manipulate it. You need the_permalink() instead, which will echo the link. The difference used to be clear in the Codex but now, in the much inferior, “developer” code reference toward which WordPress is migrating it is not so clear.

Single.php category entries not showing right colours

You should be running the first piece of code inside your foreach loop. What you are currently doing is to get all the post terms, get the first term object, then passing the custom field value of that term into your foreach loop for every post term. Your code should look something like this: $post_categories … Read more