• softeam

    (@softeam)


    Hello,
    I have some problems about NEXTGEN Gallery and one other simple shortcode in the same page. The results are here:
    http://strigo.de/beta/galerie/

    (there is only a thumbnail preview instead the gallery)

    This problem is only when I use [insert_page page=”shortlink”].

    My shortcode declared:

    function pa_insertPage($atts, $content = null) {
     // Default output if no pageid given
     $output = NULL;
    
     // extract atts and assign to array
     extract(shortcode_atts(array(
     "page" => '' // default value could be placed here
     ), $atts));
    
     // if a page id is specified, then run query
     if (!empty($page)) {
     $pageContent = new WP_query();
     $pageContent->query(array('pagename' => $page));
     while ($pageContent->have_posts()) : $pageContent->the_post();
     // assign the content to $output
     $output = get_the_content();
     $output = apply_filters( 'the_content', get_the_content() );
     endwhile;
     }
    
     return $output;
    }
    add_shortcode('insert_page', 'pa_insertPage');

    Thanks in advice!

    (And btw, the “define( ‘NGG_DISABLE_FILTER_THE_CONTENT’, true );” doesn’t work)
    https://wordpress.org/plugins/nextgen-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘NEXTGEN & Other Custom Shortcode in the Same Page’ is closed to new replies.