Yoast plugin is not showing meta description and meta keyword - wordpress

I am a newbie and learning new things every now and then. I recently set up Yoast on my WordPress website and I put title, focus keyword, and meta description for every single page of my website manually in Yoast widget. This shows up under the page but unfortunately the meta description and keywords is not appear on the page source.
In fact throughout the website same title and description is displayed. Is there any additional configuration required after installation of Yoast in header.php or somewhere in files?

You can add code to functions.php for showing focus keywords as meta-keywords in section of the page.
function set_head_keywords() {
$id = get_the_ID();
if (!$id) return;
$meta = get_post_meta( $id, '_yoast_wpseo_focuskw', true );
echo '<meta name="keywords" content="'.$meta.'" />';
}
add_action( 'wp_head', 'set_head_keywords' );

Answer from Yoast seo plugin is stated below:
We’ve removed the meta keywords feature in Yoast SEO from version 6.3. Meta keywords haven’t had a use for a long time, so their removal from our plugin has been long overdue.
Reference: https://kb.yoast.com/kb/meta-keywords-yoast-seo/
Google:
Google does not use the keywords meta tag in web ranking.
Reference: https://webmasters.googleblog.com/2009/09/google-does-not-use-keywords-meta-tag.html
Yahoo! Announced they no longer use the meta keywords tag anymore either.
Bing:
On 2014: Today, it’s pretty clear the meta keyword tag is dead in terms of SEO value. Sure, it might have value for contextual ad systems or serve as a signal to ‘bots plying the web looking for topics to target, but as far as search goes, that tag flat lined years ago as a booster.
Reference: https://blogs.bing.com/webmaster/2014/10/03/blame-the-meta-keyword-tag

Related

wordpress search should not return no-index'd pages

I am using the wonderful Yoast plugin for all sorts of things, but largely to no-index and no-follow pages. We are a PPC based site so therefore we removed search. Now the client wants it back in but I need the wordpress built-in search NOT to return a large number of no-indexed pages.
I know you can build in to exclude various meta descriptions.
I was going to adapt this as a start:
https://css-tricks.com/forums/topic/using-wps-pre_get_posts-to-exclude-post-with-meta_key/
Question - What is the term I am looking for - meta-no-index=no??
Why doesn't Yoast do this by default?
You'll need to edit the robots meta tag that is outputted by the wp_head() function.
If using Yoast, this is the WP filter to change the robots meta tag content:
add_filter('wpseo_robots', 'yoast_no_search_noindex', 999);
function yoast_no_search_noindex($string= "") {
if (is_search()) {
$string= "index,follow";
}
return $string;
}
https://wordpress.stackexchange.com/questions/136220/remove-meta-robots-tag-from-wp-head

Can I remove the JSON-LD schema that Yoast adds to my WordPress site?

I would like to remove the JSON-LD schema that Yoast applies to my WordPress site so that I can add my own. I have already added my own, and Google Structured Data Testing says that it is OK, but basically I have 3 separate JSON-LD schemas instead of two because of Yoast.
You can see what I mean here: https://search.google.com/structured-data/testing-tool/u/0/#url=http%3A%2F%2Fwww.yogabearpc.com
Yoast has added the WebSite schema and it seems unnecessary or even damaging?
I wanted to disable this because of the sitelinks searchbox and the fact that I don't have a search function that works globally, just on the blog. Having the search box enabled for me would have undesirable effects.
The easier option may just be to prevent Google using the sitelinks searchbox without having to touch the functions files. You can prevent Google using sitelinks searchbox on your site by using the following meta:
<meta name="google" content="nositelinkssearchbox" />
If you want to disable Yoast's JSON-LD all together then here's a snippet from my blog and the code I use on my site:
SOURCE
How to disable Yoast SEO Schema JSON-LD completely
function bybe_remove_yoast_json($data){
$data = array();
return $data;
}
add_filter('wpseo_json_ld_output', 'bybe_remove_yoast_json', 10, 1);
Login to your WordPress dashboard and head over to the editor
within the tab menu appearance, find your functions file (normally
named functions.php) and add the code below just before the PHP tag is
closed at the bottom.
Simplest way to completely disable the Yoast SEO schema JSON-LD
Add this line to functions.php file:
add_filter( 'wpseo_json_ld_output', '__return_empty_array' );
Source
If you want to disable just Organization or just Website, add this to your theme's functions.php file:
function bybe_remove_yoast_json($data){
if ( (isset($data['#type'])) && ($data['#type'] == 'Organization') ) {
$data = array();
}
return $data;
}
add_filter('wpseo_json_ld_output', 'bybe_remove_yoast_json', 10, 1);
Unless the data Yoast produces is wrong, there is no harm in having it. Quite the contrary, having more structured data is better than having less.
If having it is "unnecessary" depends on your definition of what is necessary. Some consumers might be interested in it, others not.
My guess is that Yoast adds a WebSite entity because of Google’s sitelinks searchbox rich snippet result, which allows Google users to search your site directly from the Google search result.

Does CMS systems like Orchard or WordPress have RSS feed for comments?

I would like to aggregate posts from different already existing blogs on my website. I want to show blog title and number of comments. The blogs already exists and I don't own them.
Do the most common CMSs provide RSS feed for comments by default so I can show number of comment next to each blog post?
Well, Orchard supports the generation of RSS feeds on any content type, not just posts and comments, but by default, comment feeds are not typically exposed on blogs managed by Orchard. You'd need the cooperation from the person managing the blog so that they add it.
In general, it's easy to discover what feeds any site exposes no matter what CMS (if any) is used to manage it. Just view the source, and look for link tags with type="application/rss+xml" attribute. The href on those tags points to the feeds.
I can only reply for wordpress, and the answer is Yes ...
( although probably true for most CMS )
The wordpress comments RSS feed url can be retrieved via
<?php bloginfo('comments_rss2_url'); ?>
For a single post it would be a template tag
<?php post_comments_feed_link('RSS 2.0'); ?>
The site comments default URL would be
http://example.com/?feed=comments-rss2
And you can even control the single post comment link with
post_comments_feed_link( $link_text = 'link_text', $post_id = 'post_id',
$feed = 'feed_type' );
You can read more about wordpress feeds in the mighty CODEX

Soundcloud Wordpress Plugin passing database value into Shortcode

I'm using the SoundCloud plugin for Wordpress. The shortcode format they recommend using is:
[soundcloud]http://soundcloud.com/forss/flickermood[/soundcloud]
I've also searched and found that this format can be used as well:
[soundcloud url="https://api.soundcloud.com/playlists/25121853" params="auto_play=false&hide_related=false&visual=true" width="100%" height="450" iframe="true" /]
Basically my question is how would I pass a database value into the url section of this shortcode. I've used shortcodes for other plugins before which involve the use of key="xxx", but the Soundcloud shortcode seems to need the url="xxx" part.
I'm sorry if this is unclear, it's my first attempt at getting help on stackoverflow.
Many Thanks,
Paul
If you want to do it from the wordpress post editor, you will first have to install "Allow PHP in Posts and Pages" plugin. As you already have the value in your post_meta table, All you have to do in your editor is something like.
[php] echo get_post_meta( $post_id, 'soundcloudlink', TRUE );[/php]
Replace $post_id with the id of your post.

Wordpress: How to pass additional Content to the blog-preview page?

For each blog-post on my wordpress-blog I'd like to have Teaxtarea where i can pass additional content for that post.
In my case that would be an unordered list which contains a quick overview of the content.
That additional content should be displayed in the preview of the post on the blog-preview-page.
My problem:
I am actually not sure on how to best add this additional content and then pass it to the preview.
Do I use wordpress' custom fields for something like this?
I'm gratefull for a push in the right direction.
Thank you,
Nils
If I understand you right, I'd take a look at "custom meta boxes" functionality - it allows you to add any type of additional input into your blog post admin area, and than display its content on front-end however you like.
There's a nice tutorial series on that topic, with example code snippets:
http://wp.tutsplus.com/series/reusable-custom-meta-boxes/
And if you'd like to display the textarea content only in preview mode, you can use appropriate conditional tag in you template file:
http://codex.wordpress.org/Conditional_Tags#A_Preview
The conditional tag is_preview returns true when a single post is viewed in Draft mode. The following will append post meta to the content when a post is being previewed:
function so16799607_preview( $content )
{
if ( ! is_preview() )
return $content;
return $content . get_post_meta( get_the_ID(), 'my_post_meta', true );
}
add_filter( 'the_content', 'so16799607_preview', 10, 1 );
You should check out Advanced Custom Fields. That's a really stable plugin that lets you create custom meta boxes in posts, pages and custom post types. That plugin does exactly what your question states. Need al little PHP to get stuff from your database, but that is as easy as:
<?php the_field(field_name);?>
And the documentation is pretty good. And if you don't like a plugin, it exports the PHP as well.
Anther tool that does the same is Pods Framework. Both powerfull extensions to any WP install in my opinion.
Hope this helps.

Resources