WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: NextGEN Gallery] Show Next Gen album outside content and sidebar (9 posts)

  1. Jeroen
    Member
    Posted 6 years ago #

    I would like to show a Next Gen album outside the content and the sidebar. I made a sort of block between the content and the footer, and i would like to show a Next Gen album there.

    I tried with adding this code [album=1,compact] inside this block, but that didn't worked. It only shows that specific text.

    Which code do I need to use to show Next Gen album?

    http://test.jeroenonstenk.nl/activiteiten/

  2. WhisperT
    Member
    Posted 6 years ago #

    I used this:

    <?php echo nggShowAlbum($albumID,$mode); ?>

    Replacing $albumID with the id of the album you want to use, and replacing $mode with the mode you want to use (or leave it blank if you wish to use the default mode)

    The functions which replace the shortcode are found in nggfunctions.php

    Anyone feel free to correct me if there is a better way to do this. I'm using this though and it works for me.

  3. Jeroen
    Member
    Posted 6 years ago #

    @ WhisperT

    Unfortunately that code doesn't seem to work here. I tried different variations on the code but it didn't showed the album.

    I tried the following:
    <?php echo nggShowAlbum(1,compact); ?>
    <?php echo nggShowAlbum($albumID = "1",$mode = "compact"); ?>
    <?php echo nggShowAlbum($albumID = 1,$mode = "compact"); ?>

    But none worked.

    In the source code a small part is called though, but only this part:
    <div class="ngg-albumoverview"></div>
    <div class="ngg-clear"></div>

    The mode and the albumID aren't shown

  4. WhisperT
    Member
    Posted 6 years ago #

    <?php $footeralbum = '[album=1]';
       $footeralbum = apply_filters('the_content', $footeralbum );
       echo $footeralbum; ?>

    OK here try this instead. The other works for me but I have my template tweaked out pretty bad. I know this one works too.

  5. Alex Rabe
    Member
    Posted 6 years ago #

    The code for albums is now a little bit more complicate, I will introduce a better template function in the next version

  6. Jeroen
    Member
    Posted 6 years ago #

    Thanks WhisperT, that code worked.

    I changed it a little to have it working with the compact style, instead of the extend style

    <?php $footeralbum = '[album=1,compact]';
       $footeralbum = apply_filters('the_content', $footeralbum );
       echo $footeralbum; ?>

    But also a big thanks @ Alex!
    A better template function would be more then welcome.

  7. Jeroen
    Member
    Posted 6 years ago #

    @ Alex

    What could be great is that the album mode (the album overview) is shown outside the content and the album page inside the content.
    Now I have album page in the same spot as the overview, and I wish it would appear in the content area.

    http://test.jeroenonstenk.nl/

  8. Jeroen
    Member
    Posted 6 years ago #

    Or is this already possible and am I overlooking something...?

  9. firehead
    Member
    Posted 5 years ago #

    is there a way to do this with galleries?

    if so ... here's the kicker ... is there a way to randomize it?

    - sean

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.