• I am using the latest version of NGG.

    In my theme, I have a shortcode that gets the content from a post and then adds the_content filter to it.

    If I use that shortcode within the post and then use the NGG gallery shortcode e.g

    <img class="ngg_displayed_gallery mceItem" alt="" src="https://avadatest.theme-fusion.com/nextgen-attach_to_post/preview/id--4687" />
    
    [ngg_images gallery_ids="1" exclusions="" display_type="photocrati-nextgen_basic_thumbnails" thumbnail_width="120" thumbnail_height="90"]

    The shortcode fails to parse and and this is what I get within the page content https://cl.ly/image/1k2e0d2Z143j however if I remove the shortcode that has the_content filter $content = apply_filters('the_content', $content); the shortcodes start to work again.

    I found out that if I remove add_filter('the_content', array(&$this, 'deactivate_all'), 1); from NGG shortcode manager class, the shortodes work when multiple the_content filters are applied.

    Are you guys going to consider fixing this?

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 3 replies - 16 through 18 (of 18 total)
  • I found this and completely solved my problem:

    NextGen gallery shortcodes not working
    One of the filter that deactivates all the shortcodes in the nextgen gallery breaks nextgen shortcodes whenever there is the_content hook involved within any other shortcode that is on the same page as NGG shortcodes. This will happen to any theme that has this kind of shortcode which involves fetching post content from any post type. To fix this, nextgen gallery plugin core files will have to edited and maintained to remove this filter until NGG adds it to the core. Edit wp-content/plugins/nextgen-gallery/non_pope/class.nextgen_shortcode_manager.php, find and delete the following code:
    add_filter('the_content', array(&$this, 'deactivate_all'), 1);

    hello people. any idea???

    Plugin Contributor photocrati

    (@photocrati)

    @narelly – The following was noted in the changelog from version 2.0.63. As this does appear to be directly related to the issue noted on trac ticket #17817 the only work-around we have at the moment is to add the following to your wp-config.php file:

    define( 'NGG_DISABLE_FILTER_THE_CONTENT', true );

    If the issue persists, please start a new topic rather than continue to bring forward this very old topic.

    Thanks!

    – Cais.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘shortcodes fail after the_content filter’ is closed to new replies.