WordPress.org

Ready to get started?Download WordPress

Forums

thumbnail link to direct link with large picture (5 posts)

  1. dom44
    Member
    Posted 6 years ago #

    Hi,

    Here is my problem. On my blog's main page I have a post with 5 thumbnail images. I want all these images to be linked to the direct link of the post but the direct link should have all the pictures in full size.

    Currently when i add the thumbnail I am given only 3 options "link to File" "Link to Page" and "do nothing"

    Link to file only brings up the original jpg file, and the "Link to page" contains only the thumbnail versions of the pic

    Ho do I get the the page to display the full size image, while having the blog index only display the thumbnails.

    Any help is greatly appreciated.

    Thank you

  2. Kafkaesqui

    Posted 6 years ago #

    I think a mod of my #1 suggestion here:

    http://wordpress.org/support/topic/65180#post-346082

    May work for you. As noted there place:

    <!--noteaser-->
    <!--more-->

    After *just* the thumbnails but before the regular images or any post content. Then change the portion of your theme's index.php where the_content() resides to:

    <?php
    $content = explode('<!--noteaser-->', $post->post_content, 2);
    if( $content[1] ) :
    ?>
    <a href="<?php the_permalink(); ?>"><?php echo trim(strip_tags($content[0], '<img>')); ?></a>
    <?php else: ?>
    <?php the_content(); ?>
    <?php endif; ?>
  3. dom44
    Member
    Posted 6 years ago #

    Hi Kafkaesqui,

    Thank you for your answer. I read over your posts.
    I installed and activated post-image. But when I try to make a post I get this erroe

    Warning: Cannot modify header information - headers already sent by (output started at /home/userrob/public_html/blog/wp-content/plugins/post-image.php:127) in /home/userrob/public_html/blog/wp-includes/pluggable.php on line 390

    I tried look for an answer on the plug-in's website but couldn'nt find anything. I suspect it is because the plug-in was make for an older version of wordpress. I am currently using v2.3

    Any suggestions on what I should do

    Thank you

  4. moshu
    Member
    Posted 6 years ago #

  5. dom44
    Member
    Posted 6 years ago #

    Thanks Kafkaesqui and Moshu,

    I solved the problem by removing the ?> ending of the plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic