Forums

Insert Image, NextGen Gallery or other in top of post (3 posts)

  1. rumlab
    Member
    Posted 1 year ago #

    Hi all.
    I would like to insert my nextgen gallery above the title (and text content) of the post. How is this possible, as the gallery is fetched writing something in the posts content. Is there a way to separate the gallery from the text content???

    Thanks!

    Morten

  2. rumlab
    Member
    Posted 1 year ago #

    Hmmm. I had it sort of working, but somehow screwed it up. I used this snip of code I found:

    <?php $gallery = get_post_meta($post->ID, ‘gallery’, true); ?>
    <?php
    $gal = $gallery;
    $gal = apply_filters(‘the_content’, $gal );
    echo $gal;
    ?>

    Made a custom field with a 'gallery' key and a value of [imagebrowser id=x]. This is my page.php loop:

    <div id="block_content">
    
    		<?php query_posts('category_name=arrangementer'); ?>
    		<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    
    		<div class="content">
    		<div class="text_content">
    
    			<?php $gallery = get_post_meta($post->ID, ‘gallery’, true); ?>
    			<?php
    			$gal = $gallery;
    			$gal = apply_filters('the_content', $gal );
    			echo $gal;
    			?>
    
                            <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    			<small>on <?php the_time('M d'); ?> in <?php the_category(', '); ?> tagged <?php the_tags(''); ?> by <?php the_author_posts_link(); ?></small>
                            <ingress><?php the_excerpt(); ?></ingress>
    			<p><?php the_content(); ?></p>	
    
    		</div>
    		</div>
    
    		<?php endwhile ?>

    Any advice is most welcome please.

    Morten

  3. rumlab
    Member
    Posted 1 year ago #

    Sorry, I'm talking to myself.
    Everything worked after a reinstall of NextGen. But I never changed settings or any vital files, so strange I could brake it just by calling the shortcode i different ways...

Topic Closed

This topic has been closed to new replies.

About this Topic