Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1158922

    Hi,
    I’m trying to add a second av-share-box in any single post page (in addition to the one at the bottom of the article), right under H2.
    I’ve tried by adding it as shortcode but it returns a fatal error:

    FATAL ERROR: UNCAUGHT ERROR: MAXIMUM FUNCTION NESTING LEVEL OF ‘256’ REACHED, ABORTING!

    Thank you for your help.

    Here is my code:

    #1159774

    Anyone?

    #1160146

    Hi,

    Thank you for the inquiry.

    Try to use the “ava_after_content” hook instead of the content filter.

    function ava_social_below_h2($id, $context){
        if (is_single()) {
            echo do_shortcode( '[av_social_share]' );
        }
    }
    
    add_action('ava_after_content', 'ava_social_below_h2', 10, 2);
    

    You may need to add the following filter to properly execute the shortcode.

    // https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/ALB%20Elements/General%20filters/avf_alb_exec_sc_only.php

    Best regards,
    Ismael

    #1160404

    Tried as suggested and I get another av-share-box in overlay with the default one at the bottom of the article (see screen):

    View post on imgur.com

    How can I place the shortcode on the top of the article, right under the first H2?

    #1160728

    Hi WPStyling2020,

    There does not seem the appropriate filter for this. You need to edit the /includes/loop-index.php file if your posts are built with the Classic editor.

    If you need further assistance please let us know.
    Best regards,
    Victoria

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