Site logo

[Support request] How to fix issues in creative work (google structure data testing tool)

Home Forums Support [Support request] How to fix issues in creative work (google structure data testing tool)

Home Forums Support How to fix issues in creative work (google structure data testing tool)

Viewing 15 posts - 16 through 30 (of 42 total)
  • Author
    Posts
  • #731662
    Tom
    Lead Developer
    Lead Developer

    That code is new in GP 2.2, and was introduced towards the end of the betas.

    Glad it’s working 🙂

    #731691
    Soumyadip

    Hi tom one more thing.. i just looked into this article https://docs.generatepress.com/article/json-ld/ will i have to implement the below code ?

    add_filter( 'generate_json_ld', function( $data ) {
    	if ( is_singular( 'recipe' ) ) {
    		$data['@type'] = 'Recipe';
    
    		$data['name'] = get_the_title();
    
    		$data['prepTime'] = get_post_meta( get_the_ID(), '_my_prep_time_field', true );
    		$data['cookTime'] = get_post_meta( get_the_ID(), '_my_cook_time_field', true );
    	}
    
    	return $data;
    } );

    Because i am also running a food blog…
    Plz help me with this…

    #731696
    Tom
    Lead Developer
    Lead Developer

    That code no longer applies, as we pulled the JSON-LD option before releasing 2.2.

    Wanted to work on it some more before releasing it to the wild.

    #731706
    Soumyadip

    Thanks tom just waiting your next amazing updates…

    #731708
    Tom
    Lead Developer
    Lead Developer

    Thanks! 🙂

    #732971
    Soumyadip

    Hi tom one thing I forget is “Hatom” is still showing there have a look…http://i.is.cc/N1cx3ej.png

    Let me know how to remove that too..

    #733571
    Tom
    Lead Developer
    Lead Developer

    hatom is added using classes within certain objects. It’s not possible to remove those as of now.

    #734062
    Soumyadip

    Ok.. but having hatom in the schema is good or bad.. any bad seo effects?

    #734769
    Tom
    Lead Developer
    Lead Developer

    Definitely not. We wouldn’t add anything to theme that would hurt SEO 🙂

    #1009224
    Soumyadip

    Hi Tom, any updates regarding htom (it’s almost a year), it’s still showing https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fwww.allchickenrecipes.com%2Fchicken-salad-with-grapes%2F

    Let me know how to remove that

    #1009446
    Tom
    Lead Developer
    Lead Developer

    Does adding this function make a difference?:

    add_filter( 'post_class', function( $classes ) {
        $classes = array_diff( $classes, array( 'hentry' ) );
    
        return $classes;
    } );
    #1010373
    Soumyadip

    Naah, no difference! I also tried to replace “hentry” with “hatom” in your code.. but still hatom is showing in the testing tool.

    #1010845
    Tom
    Lead Developer
    Lead Developer

    Is that code still active (with hentry)? If not, can you re-add it?

    #1011254
    Soumyadip

    Ok, I have re-added the exact code of yours.
    You can have a look

    #1011828
    Tom
    Lead Developer
    Lead Developer

    Looks like that removed most of it. The only remaining parts are the tags. Out of curiosity, if you disable tags in Customize > Layout > Blog, does it remove the remaining hatom stuff?

Viewing 15 posts - 16 through 30 (of 42 total)
  • You must be logged in to reply to this topic.