Gallery Issues

Viewing 12 posts - 1 through 12 (of 12 total)
  • #14576
    TSOP
    Participant

    Hi,

    Could you confirm if the following is a bug or if I am doing something wrong?

    I post an article as a ‘gallery post’, then when it shows up in between all the other posts, the, let’s say, ‘featured image’ is a collection of a couple of pictures from the gallery. Which is all fine so far. However, when you click on this little picture (instead of the title) it pops up huge in some kind of preview showing the pictures that are used as ‘featured image’. Even from other galleries. It is hard explain, so perhaps you can take a look for yourself: http://www.thespinoffproject.com/category/being-an-artist/

    In short, I would think that when someone clicks on the post image, it should bring them to the post, not open a preview of a collection of ‘featured post images’ from all the galleries that one has.

    One other thing: would it be an idea/possibility to within the gallery add the words ‘previous’ and ‘next’? I believe it is quite confusing at the moment, I do not think people get that they have to click on the images below to go forward through a gallery.

    Thank you. Your help is very much appreciated.

    #14594
    Daniel Tara
    Keymaster

    Yes, that is the intended behavior of the gallery post format. If you want to direct the images to the post you’ll have to edit functions.php inside the function pinboard_post_image() replace this line:

    <a href="<?php $image = wp_get_attachment_image_src( $attachment- rel="nofollow">ID, 'full' ); echo $image[0]; ?>" class="colorbox" title="<?php echo esc_attr( get_the_title( $attachment->ID ) ); ?>" rel="attachment">

    with this:

    <a href="<?php the_permalink(); ? rel="nofollow">" class="colorbox" title="<?php the_title_attribute(); ?>" rel="attachment">
    • This reply was modified 9 years, 10 months ago by Daniel Tara.
    #14624
    TSOP
    Participant

    There is no such line:

    <a href="ID, ‘full’ ); echo $image[0]; ?>” class=”colorbox” title=”ID ) ); ?>” rel=”attachment”>

    So, makes it hard to replace it ..

    #14625
    TSOP
    Participant

    do you perhaps mean the other way around?

    #14631
    Daniel Tara
    Keymaster

    If you haven’t changed the file it should be on line 1819.

    #14960
    TSOP
    Participant

    This is how the function pinboard_post_image() in functions.php looks like:

    1814 function pinboard_post_image() {
    1815 if( has_post_thumbnail() ) : ?>
    1816
    1817 <a href="” title=”” class =”colorbox” rel=”attachment”>
    1818
    1819
    1820

    I would really appreciate if you could modify it and send it back to me so that I can replace the original one with your version.

    #14961
    TSOP
    Participant

    P.S. I have not changed anything.

    #15141
    Daniel Tara
    Keymaster

    It’s the line that has class="colorbox" rel="attachment"

    #15212
    TSOP
    Participant

    `1814 function pinboard_post_image() {
    1815 if( has_post_thumbnail() ) : ?>
    1816 <figure>
    1817 <a href=”<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘full’ ); echo $image[0] ?>” title=”<?php the_title_attribute(); ?>” class =”colorbox” rel=”attachment”>
    1818 <?php the_post_thumbnail( ( pinboard_is_teaser() ? ‘teaser-thumb’ : ‘image-thumb’ ) ); ?>
    1819 </a>
    1820 </figure>

    It already says that. Can you please modify the code and put the changes in red or something? It is not clear what you mean.

    #15219
    Daniel Tara
    Keymaster

    You need to replace $image = wp_get_attachment_image_src( $attachment- rel=" nofollow"="">ID, 'full' ); echo $image[0]; with the_permalink(); and remove rel="attachment" and class="colorbox"

    #15272
    TSOP
    Participant

    Hello,

    The code you want me to replace is NOT in functions.php. Please have a closer look into the code I provided in my previous comment, there is no line with:

    $image = wp_get_attachment_image_src( $attachment- rel=" nofollow"="">ID, 'full' ); echo $image[0];

    Thanks.

    #15590
    TSOP
    Participant

    Guys, still waiting for this. Thank you.

Viewing 12 posts - 1 through 12 (of 12 total)

Tagged: 

You must be logged in to reply to this topic.