“Page Array” displaying in title bar on Front Page

There are many ways to set page title in wordpress. 1) In admin area go to settings >> General Settings. Set “Site Title” field and “Tagline” field values. 2) You can set your page title using wp_title() function to set the title of your page. Using this function you can change your page title based … Read more

Error [Column ‘post_title’ cannot be null] when title is disabled for Custom post type

I would suggest the following improvements for better code readability and to make it easier to maintain later. Assuming you’ve removed title from your custom post type using the following function : remove_post_type_support( ‘slider’, ‘title’ ) Now if you use name=”post_title” instead of name=”wys_slider_title” WordPress will still use it and update the post title accordingly. … Read more

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

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