Support » Plugin: Easy Digital Downloads » Missing field name – Google search console

  • Resolved kcaluwae

    (@kcaluwae)


    I get an error in Google Search Console that my product has no field “name”.

    I wonder if this is a new requirement from Google and something that might be added in the newer versions of EDD or if I should do some coding to add the field myself.

    Did anybody else get the same error in their search console?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 28 total)
  • Hi @kcaluwae

    Thanks for the info. Can you please provide me the screenshot of error? so I can take a look at it.

    Is this your product name “3 to 7 days Seoul Itinerary”?

    Hi @pratik-jain,

    There’s a screenshot here: https://prnt.sc/nzocd2

    That’s indeed the product.

    Thanks for looking into it.

    Hi @kcaluwae

    Thanks for the screenshot. After doing some R&D it looks like that your theme is not allowing plugin to add Microdata at product title.

    I have checked that you are using “Hestia” theme and yes it has a problem. It removing EDD microdata from product title.

    Please add below code to your theme / child theme functions.php file.

    function hestia_wp_kses_allowed_html( $allowedposttags, $context ) {
    
    	if( $context == 'post' ) {
    		$allowedposttags['span']['itemprop'] = true;
    	}
    
    	return $allowedposttags;
    }
    add_filter( 'wp_kses_allowed_html', 'hestia_wp_kses_allowed_html', 10, 2 );

    Please add the above code and check with that.

    Pratik Jain

    (@pratik-jain)

    Hi @kcaluwae

    Does your problem resolved with the provided above code?

    kcaluwae

    (@kcaluwae)

    Sorry @pratik-jain, I was abroad with no access to the site. I’m currently on my way back home. I will try your code tomorrow.

    Thanks already for your help. I will have more news tomorrow!

    Kris

    kcaluwae

    (@kcaluwae)

    Hi @pratik-jain,

    Unfortunately, it seems this code does not solve the problem.

    After inserting the code I’ve retested the page and I have been searching for json code that resembles a product description.
    The only json found in the page code is the one that describes the article.

    Can the following code interfere with your solution? It’s also in the functions.php file.

    define('EDD_SLUG', 'eguides');
    
    function set_download_labels($labels) {
    	$labels = array(
    		'name' => _x('E-guides', 'post type general name', 'your-domain'),
    		'singular_name' => _x('E-guide', 'post type singular name', 'your-domain'),
    		'add_new' => __('Add New', 'your-domain'),
    		'add_new_item' => __('Add New E-guide', 'your-domain'),
    		'edit_item' => __('Edit E-guide', 'your-domain'),
    		'new_item' => __('New E-guide', 'your-domain'),
    		'all_items' => __('All E-guides', 'your-domain'),
    		'view_item' => __('View E-guide', 'your-domain'),
    		'search_items' => __('Search E-guides', 'your-domain'),
    		'not_found' =>  __('No E-guides found', 'your-domain'),
    		'not_found_in_trash' => __('No E-guides found in Trash', 'your-domain'), 
    		'parent_item_colon' => '',
    		'menu_name' => __('E-guides', 'your-domain'),
    		'featured_image'        => __( '%1$s Image', 'easy-digital-downloads' ),
    		'set_featured_image'    => __( 'Set %1$s Image', 'easy-digital-downloads' ),
    		'remove_featured_image' => __( 'Remove %1$s Image', 'easy-digital-downloads' ),
    		'use_featured_image'    => __( 'Use as %1$s Image', 'easy-digital-downloads' ),
    	);
    	return $labels;
    }
    add_filter('edd_download_labels', 'set_download_labels');
    Pratik Jain

    (@pratik-jain)

    Hi @kcaluwae

    Thanks for your response. Actually the code which I have provided you is working. Please refer below screenshot http://prntscr.com/o4bul4

    After doing more R&D I found that issue is coming because the Product title is coming out side of “http://schema.org/Product” property tag.

    Please refer below screenshots
    http://schema.org/Product – Your Website
    http://prntscr.com/o4bxqg – EDD Demo Website

    These are the structured data and it should come in it’s format and rule. These data is disturbed because of the theme structure.

    Here I am providing you another code snippet, Please add below code to your theme / child theme functions.php file.

    I suggest you to remove the previous code which I have provided and add the new code.

    function _hestia_before_single_post_article() {
    	if( is_singular('download') ) {
    		echo "<h2 class='hestia-title entry-title'>".get_the_title()."</h2>";
    	}
    }
    add_action( 'hestia_before_single_post_article', '_hestia_before_single_post_article' );

    This code adds the Post Title in structured data in your product page which is necessary right now to remove that warning as per structured data rule.

    Please try the code and update me for the same.

    kcaluwae

    (@kcaluwae)

    Hi @pratik-jain,

    I’ve implemented your code and verified the code.

    If I’m correct it looks like the <span itemprop=’name’> element is now within the scope of the <span itemscope> element.

    If you would be so kind to check as well because I’m not sure if this is all I need to check.

    Thanks!
    Kris

    Pratik Jain

    (@pratik-jain)

    Hi @kcaluwae

    Yes, It looks perfect. The code is working fine.

    Now there is no error in Google Structured data. Please see below image http://prntscr.com/o4sk73

    kcaluwae

    (@kcaluwae)

    @pratik-jain , Thanks very much for your help!

    I have the same problem with errors reported by Google Search Console, using Genesis Framework. None of the code snippets above had any effect. Any help would be appreciated. See https://www.ziplinetosuccess.com/downloads/zipline-to-success-stealth-marketing-part-1/

    Thanks.

    • This reply was modified 5 months, 4 weeks ago by Greg Falken.

    Hi @gregf

    Thanks for the page link. I have checked it and found that there are two schema property is defined within same place so the structured data error is coming.

    Please refer below screenshot https://image.prntscr.com/image/-EX7dR3-Te_NBeYNa66RuQ.png

    Are you using any structured data plugin? OR I think it is coming from your theme.

    You should remove this schema property “https://schema.org/CreativeWork&#8221; to avoid error.

    Thanks for the quick reply. I’ll have to research how to selectively remove the CreativeWork schema from the /downloads/ post type (using Genesis Framework).

    Hi @gregf

    Thanks for your response.

    There are two ways to handle this. Either you have to remove the EDD structured micro schema data or you have to remove your theme structured micro schema data.

    Can you please tell me which theme are you using?

    You can remove EDD structured micro schema data by below code snippet. Please add below code snippet to your current theme / child theme functions.php file.
    https://gist.github.com/Pratik-Jain12/332a6abbc2af07ea91b637ceb5cf7448

    Removing the EDD microdata got rid of the error. I’d rather have gone the other way and removed the CreativeWorks data for the page but I’m still not sure how to do that. I’m using a modified version of Enterprise Pro for Genesis Framework.

    Thanks.

Viewing 15 replies - 1 through 15 (of 28 total)
  • You must be logged in to reply to this topic.