Turntable
Member
Posted 1 year ago #
I'm making a photo blog with each post having a single photo no text.
How do I link the photo to the single post from the main content page without the photo linking when viewing the single post?
In other words when someone is viewing the main website I want them to be able to click on the title or photo to take them to the single post. But when they are viewing the single post I do not want the image to be linked at all.
thanks in advance.
Turntable
Member
Posted 1 year ago #
I'm using a custom theme. Each photo is not a small thumbnail but full size.
Photo Width is fixed 500px, Height is variable.
What exactly do I put in the loop for this to work?
thanks
Can you put the content of your theme's index.php in the http://wordpress.pastebin.com/ and give a link back to it here.
With post thumbnails you can have many different sizes. see add image size A post thumbnail isn't necessarily a thumbnail. You can also show the large size.
Turntable
Member
Posted 1 year ago #
http://wordpress.pastebin.com/Sb7wKfbL
If you know a good theme for doing what I need I'm open to suggestions.
thanks for your help kees
Put this in your functions.php:
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 150, 150 ); // default Post Thumbnail dimensions
}
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'large_photos', 500, 9999 ); //500 pixels wide (and unlimited height)
}
Now you can insert a post thumbnail when you edit or create a post
and use this as your index: http://wordpress.pastebin.com/TJCfh0GJ
Can you put single.php also in the pastebin so we can show the photo also there but without the link.
Turntable
Member
Posted 1 year ago #
here is the single.php http://wordpress.pastebin.com/cmNM61iS
thanks and how do you add a thumbnail to the post is it different then just inserting a photo to the post?
No, you can insert as normal but now next to "Insert into Post" you can click a link "Use as featured image". There is also a new sidebar panel called "Features Image" when you edit or create a post.