How to remove the duplicate title tags and duplicate meta descriptions?
How to remove the duplicate title tags and duplicate meta descriptions?
How to remove the duplicate title tags and duplicate meta descriptions?
How can I remove an unwanted character from the main page’s title?
Reorder title tag and description tag with wpseo_title and wpseo_metadesc
You can use “the_title” filter for this. http://codex.wordpress.org/Function_Reference/the_title add_filter(‘the_title’,’callbackfunction’); function callbackfunction($data){ global $post; $new_title = “new page title”; //You can set dynamic title from $post return $new_title; } If you just want to change the site title you can do this in the backend itself “Settings->General->Site Title”
Your best bet may be to use existing WordPress filters to modify your page title. For your needs, the the_title() filter would probably be your best best. Here’s a link to a pretty good tutorial on using it.
Set page title in WordPress with PHP
As maverick said in the comments, you need to accept the arguments which come along with the filter. Try this function shikharfirstletter($title) { $title = ucfirst($title); return $title; } add_filter( ‘wp_title’, ‘shikharfirstletter’, 10, 1 ); https://developer.wordpress.org/reference/hooks/wp_title/
Use the following code into your functions.php file. function change_title_yt( $post_id ) { $current_title = $_POST[‘post_title’]; $doc = new DOMDocument(); $doc->preserveWhiteSpace = FALSE; $doc->loadHTMLFile($current_title); $title_div = $doc->getElementById(‘eow-title’); $title = $title_div->nodeValue; $my_args = array( ‘ID’ => $post_id, ‘post_title’ => $title ); if ( ! wp_is_post_revision( $post_id ) ){ // unhook this function so it doesn’t loop … Read more
You have to use the code editor. Be careful, do not write the head part, HTML tag and body tag. The syntax would be: <h1 id=”XYZ”>XYZ</h1>
The first thing you want to do will be find the post you want to modify. To find the post named “beddu” which post_type is post, you can excute this query: SELECT * FROM wp_posts WHERE post_type=”post” AND post_title=”beddu”; After you test and find the condition is correct. Move to update part. UPDATE wp_posts SET … Read more