Hello, How do i make the Read More thing in Wordpress blogs an Image..?? I dont want the read more or read the full entry text.. I want an image there.. Is it possible ??? I tried, failed.
It's possible with a self-hosted WordPress installation. In your Theme's index.php look for something like this (note: I wrote my Theme from scratch using actual semantics, not the crap that passes for semantics in WordPress) -- <a href="<?php the_permalink() ?>#more">Read the rest of <cite><?php the_title(); ?></cite>...</a> PHP: or echo '<a href="',the_permalink(),'#more">Read the rest of <cite>', the_title(),'</cite>...</a>'; PHP: Just replace the text between the <a> and </a> tags with an image.
Thanks for the reply. I didn't get you. This is the code i have in my index.php file. <?php get_header(); ?> <div id="content"> <div id="contentleft"> <div class="postarea"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div <?php post_class(); ?>> <h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1> <div class="postauthor"> </div> <?php the_content(__("Read More", 'studiopress'));?><div class="clear"></div> <div class="postmeta"> </div> </div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.', 'studiopress'); ?></p><?php endif; ?> <p><?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?></p> </div> </div> <?php include(TEMPLATEPATH."/sidebar.php");?> </div> <?php get_footer(); ?> PHP:
Oh, you're using one of Brian Gardner's Themes. Don't get me wrong, I have a lot of respect for him, but his Themes all have on thing in common -- they're too complicated for their own good. In this line, <?php the_content(__("Read More", 'studiopress'));?><div class="clear"></div> PHP: replace the text "Read More" with your image code and see what happens (I doubt it'll let you though which is pure BS -- again, his Theme code is far too complex and complicated for its own good)
Thats the first thing I tried, failed... Its throwing some error. EDIT: Hey! It worked with a strange modification. I used the traditional <img src= "image url"> -> ERROR I used <img src='image url'> -> It worked. Does anyone have an explanation for that ???
try this, on your index.php <?php the_content('<span class="read-more">read more</span'); ?> Code (markup): then style that span on your css ie .post .read-more { width:93px; height:26px; float:right; display:block; text-indent:-2000px; margin-top:20px; background:url('images/readmore.png') 0 0 no-repeat; } Code (markup):
It's the PHP parser. If you escape the double quotes, it'll work. Here's an example: <img src=\"image url\"> Note the backslashes BEFORE the quotation marks. They're "escaping" the quote marks so they don't get picked up by the PHP parser.