Tagged: AV share box
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:
Anyone?
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.
Best regards,
Ismael
Tried as suggested and I get another av-share-box in overlay with the default one at the bottom of the article (see screen):
How can I place the shortcode on the top of the article, right under the first H2?
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