 
	
		Tagged: Codeblock, google snippet
- 
		AuthorPosts
- 
		
			
				
July 8, 2020 at 8:11 pm #1228985Hi There, just got this problem, when I use the Codeblock: 
 See Screenshot here.Is there a recommendation on how I can best fit this? Thanks in advance KiM :) July 10, 2020 at 5:10 am #1229302Hey KiM, I’m not sure I understand that problem, could you try to explain a bit further please? Note that we don’t have any native German speakers on the moderator team. Best regards, 
 RikardJuly 15, 2020 at 1:58 pm #1230604The yellow section is the Google Snippet for stars in google Search and it is also visible on my site. The red section is made by enfold. The itemscope and the itemtype-Attributs in the red section are interrupting the Snippet and the rel-attribute is wrong with the a element…. this is automatic by enfold. Is there a possibility to put the snippet on my site without code changes or some code around it? Thanks in advance! Best KiM :) July 19, 2020 at 9:57 pm #1231579Hi, 
 Sorry for the late reply and thanks for the screenshot, instead of using a Text element to display your code snippet you should try using a Code Block element.
  
 To remove the “itemscope” & “itemtype” from the code block parent add a custom ID to the code block element, such as “remove_parent_attr”
  
 Then add this code to the end of your functions.php file in Appearance > Editor:function remove_parent_attr(){ ?> <script> (function($){ $(window).load(function(){ $( '#remove_parent_attr' ).each(function() { $(this).removeAttr('itemscope'); $(this).removeAttr('itemtype'); $(this).find('.avia_codeblock').removeAttr('itemprop'); }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'remove_parent_attr');Then clear your browser cache and check. 
   Best regards, 
 MikeJuly 27, 2020 at 1:19 pm #1233513Thank you. I will try this! :) Best regards KiM July 28, 2020 at 12:49 pm #1233739
- 
		AuthorPosts
- You must be logged in to reply to this topic.
