This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'img_post' ); | |
// img_post is name of my thumbnail size ( I've added my own in functions.php ) | |
$focuskw = get_post_meta(get_the_ID(), ‘_yoast_wpseo_focuskw’, true); | |
// It's focus keyword that you enter in Yoast Metabox in post edit page, it's really important | |
$primary_cat = get_post_meta(get_the_ID(), ‘_yoast_wpseo_primary_category’, true); | |
// Primary Category is important, for permalink format and meta keywords | |
if($primary_cat == NULL && $primary_cat == ''){ |