• Hi. When I insert a new picture, I have to manually remove the link to the picture. Is there a code snippet out there that frees me from the proces?

    ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • when inserting images, if you ticked the ‘link URL’ ‘none’ once, it should remember this and have it as default the next time.

    Thread Starter madsmads

    (@madsmads)

    Okay, I will try that ??

    Thread Starter madsmads

    (@madsmads)

    Hmm, still not working. If I choose none, insert a picture, and then wants to insert another, the new picture still has a link in it

    Thread Starter madsmads

    (@madsmads)

    Bump ??

    If you don’t want the image to be clickable on lets just say the index page…..go to the code editor, and edit index.php

    find <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" width="70" border="1" style="float:left;margin:0px 10px 0px 0px;" /></a>

    replace with <img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" width="70" border="1" style="float:left;margin:0px 10px 0px 0px;" />

    Basically just delete the “a href” code. Your code may look a little different, this is what mine looks like though. This means the image thumbnails on the front page posts will not be clickable, they will just be an image…

    Is this what you wanted to do? Or were you not looking to do this with the thumbnails?

    Thread Starter madsmads

    (@madsmads)

    It was excatly what I was looking for, unfortunately the code snippet does not work with my theme, but I have somehow made a workaround ??

    That what I mentioned, your code is going to look a little different.

    You will see something like this <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>

    Once you find that in your index.php or whatever file you don’t want the image to be clickable, just delete the <a href="<?php the_permalink() ?>" rel="bookmark"> and the </a>

    Basically, a href will ALWAYS mean you are making something clickable. the_permalink is the link to it. So just get rid of those two, and you will be fine!

    Thread Starter madsmads

    (@madsmads)

    Thank you, I am actually starting to understand this code stuff ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Pictures, without links’ is closed to new replies.