• Resolved Mic_H

    (@mic_h)


    Been trying to customise what is generated when you use the_content(); with Instagrabber.

    At the moment it generates:

    – The Image
    – The heading
    – A link to instagram.

    What I would like to do is have it:

    – Display just the image with no heading.
    – Link to the permalink instead of to instagram

    Any suggestions on how to achieve this?

    Really like this plugin by the way, I just wish I could figure this out

    http://wordpress.org/extend/plugins/instagrabber/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Johan Ahlbäck

    (@ferenyl)

    Interesting! Im looking at it now

    Plugin Author Johan Ahlbäck

    (@ferenyl)

    Your problem is related to the theme you are using. You can choose other way to do this. Create a new template files for this and leave out the title and use get_the_post_thumbnail( $post_id, $size, $attr ); to get the images for instagrabber.

    In your other thread you are creating a new loop so im gonna use it here to demonstrate how you can achieve this.

    <?php query_posts('post_type=images'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post-image" id="post-<?php the_ID(); ?>">"><?php echo get_the_post_thumbnail( get_the_ID(), array( 300, 300 ) );  ?></div>
    
    <?php endwhile; ?>
    <?php else: ?>
    <h2 class="main-h2">Images</h2>
    <h2>No Content</h2>
    <?php endif; ?>
    

    array( 300, 300 ) means the image will be 300×300 pixels

    if you want to display the caption yo can use <?php instagrabber_image_caption(); ?>

    If you dont have the image saved in featured or both (only content) you may have to get the image like this:
    change this:

    <div class="post-image" id="post-<?php the_ID(); ?>">"><?php echo get_the_post_thumbnail( get_the_ID(), array( 300, 300 ) );  ?></div>

    to this:

    
    <div class="post-image" id="post-<?php the_ID(); ?>">"><img src="<?php instagrabber_image_url(); ?>" width="300">
    <p>
    	<?php instagrabber_image_caption(); ?>
    </p>
    </div>
    Thread Starter Mic_H

    (@mic_h)

    Really big thank you Johan.

    <?php instagrabber_image_url(); ?>

    This has worked for me great.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customise post output’ is closed to new replies.