Does anyone know how to add meta descriptions to wordpress? - wordpress

This is my first ever post on here. Does anyone know how to add meta descriptions to wordpress?
Many thanks,
Tung

Change the Blog description goes here and add this code into your theme functions.php
function my_meta_description(){
echo '<meta name="description" content="Blog description goes here" />';
}
add_action('wp_head','my_meta_description');

You may setup content of meta description at admin page -> appearance -> customized -> site identity -> tagline (wp 4.4)
to add meta description on page, put this code between head
<meta name="description" content="<?php bloginfo('description'); ?>" />

You can edit it in menu "Appearance" in the "header.php" file. There you can edit ot. Or you can also download one of the wordpress plugins:
Yoast SEO (recommend) or All-in-SEO-pack. It will help you to customize any meta's you need!

Related

How to remove page name from google tab bar in 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>

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

facebook not fetching the logo of website

The homepage link of website posted in share box of facebook fetches a old image of the old story but not the logo of website.
In the header file of my wordpress theme i made the following change
<!--FB image-->
<meta property="og:image" content="<?php if (is_single() || is_page()) {$fbthumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'slider'); echo
$fbthumb[0];} else {echo 'http://clientdemo.crayoninfotech.com/boomnews/wp-content/uploads/2014/10/logofb1.jpg';}?>" />
The problem is still after passing the correct link of logo facebook take some other random image from one of website old story.
When I did this it took a while before it showed up on FB. Use this to see the effect of your code changes: https://developers.facebook.com/tools/debug

Wordpress SEO by Yoast doesn't display meta tags on paginated pages

I have a wordpress site that has SEO Meta tags populated by Yoast plugin.
This seems to work fine, except on any paginated page. On page2 or higher there is no
<meta name="description" > tag. Is there a simple setting I need to change? I can't find anything about it online at all.
You have to check if your Wordpress header.php has a line with:
<?php wp_head(); ?>
That allows Wordpress to inject code in the header. It has to be just before the closing head tag </head>. If not present just add it.

Bloginfo Description not showing

Hi I have looked everywhere for help topics on this and not had any luck, I currently run a fan based website. I'm using wordpress and designed my own theme, when I view the page source I know that my description in the < title > tag is not showing. In the dashboard settings I have the tagline filled in, so I'm not sure why it's not showing in the code. Below is what I have coded myself in the tag area:
<title><?php bloginfo('name'); ?> <?php wp_title('«', true, 'right'); ?> | <?php bloginfo('description'); ?></title>
I would appreciate any help on this, as I've been stuck on this for weeks now lol
Antony
I managed to solve the problem I had a plugin installed called "All in One SEO Pack", that seemed to be overriding the Bloginfo description. Once the plugin was deactivated, the description came back.

Resources