• Resolved mariostella

    (@mariostella)


    I got this code to call the Next Gen Gallery quick tag from wherever in the code even if not set in the post page:

    <?php
    $gal = '[gallery=5]';
    $gal = apply_filters('the_content', $gal );
    echo $gal;
    ?>

    which displays the gallery with id number 5.

    I need to substitute ‘[gallery=5]’ with a call to a specific custom value that will of course have the short tag format. How should I do? I have tried:

    <?php
    $gal = '<?php meta('camere'); ?>';
    $gal = apply_filters('the_content', $gal );
    echo $gal;
    ?>

    but I get an error.

Viewing 1 replies (of 1 total)
  • Thread Starter mariostella

    (@mariostella)

    done with a query:

    <?php
    
    $gal = get_post_meta($post->ID, 'gallerypopup', true);
    
    $gal = apply_filters('the_content', $gal );
    
    echo $gal;
    
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Define Next Gen Gallery quick tag content from custom field’ is closed to new replies.