• Resolved aaronlutzeffx

    (@aaronlutzeffx)


    Hi there,

    I have a custom theme which uses NextGen Gallery and we have found that our excerpts are not stripping the ngg_images shortcode.

    The php is written the following way:

    <?php echo strip_shortcodes( get_excerpt( 200 ) ); ?>

    This does succeed in stripping other shortcodes, such as WD Instagram shortcodes and other gallery plugins we are using. So I know the code is ok. For some reason, stripping ngg_images is just not being recognised as a shortcode perhaps?

    In the past we have been solving this issue by simply pushing the shortcode text below the 200 character limit (so adding more text before the shortcode). This band-aid solution is no longer acceptable and we need to get to the bottom of this now.

    We are using the latest version of the free plugin with the latest version of the NextGen Plus plugin too.

    Any help would be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @aaronlutzeffx – We use a custom shortcode method that does not touch on global $shortcode_tags; and why this has not worked for you in the past as well.

    I was not aware of this problem (nor the function) although I will write this up for our developers to review.

    The only work-around that may help is to turn off our resource manager although I do not expect it to make a difference; as it is, try adding the following to your theme’s functions.php file:

    add_filter( 'run_ngg_resource_manager', '__return_false' );

    Thanks!

    – Cais.

    Thread Starter aaronlutzeffx

    (@aaronlutzeffx)

    Hi Cais,

    Thank you for your reply. I have added your code to the functions.php file and the shortcode is still appearing.

    It would be very helpful if you could address this issue with a future update, and touch base here again one day once fixed.

    Thank you

    Plugin Contributor photocrati

    (@photocrati)

    @aaronlutzeffx – I did not think that filter would specifically help; and, as you have noted it does not, please make sure to remove it as it is key to our third-party compatibility code.

    Unfortunately, as is, I’m not seeing this issue with other themes that just use the get_excerpt() or the_excerpt() functions with a defined limit. There may be more to this in your custom theme code that may need to be reviewed.

    Have you tested your custom theme code without using the strip_shortcodes() wrapper?

    Thanks!

    – Cais.

    Thread Starter aaronlutzeffx

    (@aaronlutzeffx)

    Hi Cais,

    I removed that filter you specified.

    Also, the strip_shortcodes() wrapper wasn’t being used initially, that is when I noticed the problem. As the theme was custom-made by a third party, I will have to look into this further.

    Thank you for your help.

    Plugin Contributor photocrati

    (@photocrati)

    @aaronlutzeffx – Thanks for the update, please let us know if you do find anything else.

    – Cais.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ngg_images shortcode not being hidden by strip_shortcodes’ is closed to new replies.