Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1228985

    Hi 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 :)

    #1229302

    Hey 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,
    Rikard

    #1230604

    The 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 :)

    #1231579

    Hi,
    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.
    2020-07-19_152250.png
    To remove the “itemscope” & “itemtype” from the code block parent add a custom ID to the code block element, such as “remove_parent_attr”
    2020-07-19_152955.png
    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.
    2020-07-19_155523.png

    Best regards,
    Mike

    #1233513

    Thank you. I will try this! :)

    Best regards

    KiM

    #1233739

    Hi,
    Very good, we will leave this open until we hear back from you.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.