How to remove page name from google tab bar in wordpress - wordpress

i want to remove the "home" or "shop" title from the google tab of my WordPress website as show in the picture.
how can i remove that "home" or any other page name from there in WordPress and just display my site name or maybe site title

You can do it by hooks, put this on function.php
add_filter('wp_title','hairmone_title',10,1);
function hairmone_title($title){
$title='Your new title'; //define your title here
return $title;
}
Easier is using Yoast Plugin
For all pages,
For single pages,

You should provide code here then we can help accurately.
But anyway, In header.php there is some code like <title><?php //Some Code Here ?></title>. You can remove everything between <title></title> and write your own text there.
For example <title> This is my website </title>

Related

how to move the physical location of the permalink header in wordpress?

Does anyone know how to move the physical location of a permalink header in wordpress? I dont want it to be the first thing that is seen but rather I want a shortcode item there.
In your page.php you can delete the php function for calling the header ( the_header() ) and put the function to call the shortcode ( do_shortcode() ).
This way the page is not embeding the header.php but get the code of your shortcode at this place of your markup.
Page Template:
You can create a page template in your theme-folder. For this, you can simple duplicate the page.php and call it page-yourname.php. At the top of your page you add the name of the page template:
<?php /* Template Name: Example Template */ ?>
In that file you do the adjustments that you like to do with the shortcode.
https://developer.wordpress.org/themes/template-files-section/page-template-files/
With the template structure of wordpress, the template will automatically be found at the edit screen of your pages. It will be found on the right side under "page attributes".
You can set the template for your individual pages. So your adjustments to the template will only affect your pages, where you selected the template in the page attributes.

How to add the Schema.org markup (generated by the Structured Data Markup Helper) to specific WordPress pages?

I have used the Structured Data Markup Helper and now need to add my mark-up code. Do I add this to the main head section of the website or just the individual page head.
I assume this needs to be added to the specific page head but I'm not sure where to access this. I am using Wordpress and normally add mark-up to the child theme header.php file in my cPanel but this is for all pages.
if(is_page('home')){ ?><!-- home page with slug home
enter your schema code for homepage -->
<?php }
else if(is_page('career')){ ?><!-- career page with slug career
enter your schema code for career-->
<?php }

How to rewrite custom title and description only for blog in WordPress using child theme functions.php

How can I rewrite meta title and description in Wordpress using child theme functions.php?
I want to rewrite it only on main blog page (for example: www.example.com/blog), where I have listed all articles.
The problem is that the main theme already adds title and description to blog page. So I need to remove them first and then add custom ones.
Thank you very much for your help.
First off, WordPress does not add a <meta name=decription> tag. That is usually done by a seo plugin like Yoast, therefor the method for overriding it differ per plugin. Or theme.
You might be a able to change these texts in the wp-admin settings, again depending on the plugin/theme.
The title you should be able to change using this example:
function SO_52811727_wp_title($title) {
// see https://codex.wordpress.org/Conditional_Tags for more options
if ( is_archive() ){
$title = 'custom title';
}
return $title;
}
add_filter('wp_title', 'SO_52811727_wp_title', 100);

My wordpress homepage is not showing proper title

In my wordpress site I set my homepage to be my latest posts and when it gets loaded title doesn't show like "Home - SiteName" but only " - SiteName".
How to fix this. I want to add Static "Home" in front or after "- SiteName"
Note:
1. I tried to check my home.php file but it is not there.
2. When I am saying "title" I mean the name or description shows in browser's tab.
Thanks
hi you can add this plugin and customize the TITLE as your requirement
https://wordpress.org/plugins/custom-title/screenshots/
thanks
You can add code like this to your header.php
<title><?php
if (is_front_page()) {echo ' My wonderful Page title in here ';}
else {echo wp_title('');}
?>
</title>
It will put the echo text as your homepage title, and the post/page title as the title for the other pages. Other WordPress code can be added into the php if you want something more comprehensive

Embedding Wordfaire into Self Hosted Wordpress

I am trying to get Wordfaire live blogging embed code to work on my site and having some problems. I created a new page for my live blog feed on site site and added the embed code to the html page in wordpress. When I test it out and try a test live blog nothing runs on the page.
Is there a trick to getting it to work on wordpress??
Thanks in advance to anyone that can assist!
It sounds to me that you are using the HTML view of the WordPress editor to paste the embed code, correct?
A better way would be to make a simple plugin that will create a shortcode with the embed code, then you use that shortcode to display the embed code on your page.
Example:
embed-shortcode-plugin.php
<?php
/*
Plugin Name: Plugin Name
Plugin URI: http://pluginurl.com
Description: Plugin description
Version: 1.0
Author: Author Name
Author URI: http://authorurl.com
*/
function embed_shortcode($atts,$content=null){
extract(shortcode_atts(array('optionname'=>'defaultvalue'),$atts));
// The extract() function above will allow you to do [shortcode optionname="defaultvalue"] in your pages and use $optionname to get the value below
// The extract() line is optional and can be removed
// $optionname = defaultvalue
return 'put your embed code here';
}
add_shortcode('shortcode','embed_shortcode');
// This will add the shortcode 'shortcode': [shortcode], change to whatever
?>
Put that in your plugins folder and then activate it. Alternatively, you could remove the stuff between the /* and */ and put that code right in your theme's functions.php file and it will run the same.

Resources