plugin admin subpage title and links in menu not highlited at current page

In the function add_submenu_page() you have to specify a callback function at the end. Like you did it in the 2nd submenu page. You have to add this function to your code! Example: add_submenu_page( ‘my-parent’, ‘Subpage title’, ‘Subpage title’, ‘manage_options’, ‘my_subpage’, ‘subpage-handle’); function subpage-handle() { echo ‘<h1>Subpage title</h1>’; } In this function you can echo … Read more

Set Title from Custom Template

Use global variables to pass values from the template to the header. // in the template file global $my_page_title; $my_page_title=”field value”; global $my_meta_description; $my_meta_description = ‘field value’; get_header(); // in the header file global $my_page_title; global $my_meta_description; echo $my_page_title; echo $my_meta_description;

Sanitize the output of the_title() or the_title_attribute() to remove whitespace

You can replace the space to dashes using wordpress sanitize_title_with_dashes function Try below code. <a href=”http://twitter.com/home?status=<?php echo sanitize_title_with_dashes(get_the_title(get_the_ID())); ?>.<?php get_the_permalink(get_the_ID());?>” class=”twitter”> I have used get_the_title() and get_the_content() functions because these both function return the context instead of echo them, and i think you are concatenating the string. Hope this help .

Custom title set on quick edit

Thanks to bcworkz on wordpress.org (https://wordpress.org/support/topic/custom-title-set-on-quick-edit/#post-8631035) writing : I can’t be 100% sure, but I think it’s because the custom field data is not sent in $_POST with quick edit, so the title ends up being set as an empty field. I think what you need to do is add else code for each custom … Read more

Get rid of title from static front page

Though it is a bit difficult to draw conclusions from the screenshots, it appears as though the top area is a menu automatically created by WordPress when no other menu is present. If that is the case, creating your own menu without including a link to your “Welcome” page would solve this. The second one … Read more

Widgets not adding div on before and after title

I think you missed , at the of after_title that’s why it’s not working. Use this code it’s working fine. register_sidebar( array( ‘name’ => ‘Custom code widget’, ‘id’ => ‘custom-code’, ‘description’ => ‘Cutom code for all pages.’, ‘before_widget’ => ‘<div class=”custom-description”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<div class=”custom-code-title”><h2 class=”widget-title”>’, ‘after_title’ => ‘</h2></div>’, ) );

How to change tab’s title in search results pages? [closed]

You have to hook into the document_title_parts filter to adjust it to your needs. Example: /** * Modify the document title for the search page */ add_filter( ‘document_title_parts’, function( $title ) { if ( is_search() ) $title[‘title’] = sprintf( esc_html__( ‘&#8220;%s&#8221; result page’, ‘my-theme-domain’ ), get_search_query() ); return $title; } ); For Multiple paged search … Read more

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