Category name as page title

You can change the code in the theme files to do this. Open the file category.php (if this file doesn’t exist, try archive.php) and replace the text you want to change with single_cat_title() Here is the documentation However these changes will be overwritten if you update your theme You can create a child theme or … Read more

Change font and Colours in Menus

Goto your dashboard > appearance > customize there you can find some options to change button color,font size etc. To target your ul in menu you need to use below class: ul.nav-menu To target the li a of your menu use below class : .menu ul.nav-menu li a To target you ul under the parent … Read more

Custom title when using shortcode

This code solved my problem. function digitSix() { //some codes here; $var = “this is custom title”; add_filter( ‘pre_get_document_title’, function( $var ) use ( $var ) { return $var; }, 20 ); return $someContent; } add_shortcode(“i_digit6”, “digitSix”);

get_the_archive_title hook unwanted changes!

You could do something like this to see where it was called from: add_filter(“get_the_archive_title”, function($val) { $backtrace = debug_backtrace(); foreach($backtrace as $level) { if(array_key_exists(“file”, $level) && preg_match(“!that-file\.php$!”, $level[“file”]) && array_key_exists(“function”, $level) && $level[“function”] == “get_the_archive_title” ) { return “works: $val”; } } return “test: $val”; }, 10, 1); You’ll have to adapt the regexp (“that-file.php”) … Read more

My posts page is missing the page title

The display of ‘things’ on your blog page is usually dependent on the theme. You can verify this by switching to one of the ‘twenty’ default themes and redisplay the page. If the title appears, then you have verified that the problem is a theme problem. If you verify a problem with the theme, then … Read more

Odd hyphen added at end of blog post

This seems like a theme issue. I believe it’s trying to pull the site title or site description and append it after the hyphen. You can also see this issue occur if you hover your browser tabs title or view source and view the title tag. To test this theory you can follow the below … Read more