Read More Problem
-
I’m running the latest version of wordpress(2.7) and I customized the Read More link to be an image. From there, everything’s fine. I’m testing my website locally before uploading it to my server, so the path to the image is like this:
<?php the_content('<img src="https://localhost/wordpress-2.7/wordpress/wp-content/themes/default/images/readmore_big.gif" class="alignright">'); ?>
Naturally, when I upload it, links are broken if I try to access my website from any computer but my own, since the images are there.
I don’t want to manually change every read more link to the path of the server everytime like :*https://*mywebsite.com*/wp-content/themes/default/images/readmore_big.gif
I did read the codex post about customizing the readmore but if I use
<img src="/images/readmore_big.gif">
images won’t show up.I tried to put bloginfo(‘stylesheet_directory’) in a variable to place into the src property but then I got no image and only the path of the directory printed instead of the readmore button.
<?php $path = bloginfo('stylesheet_directory'); the_content('<img src="' . $path . '/images/readmore_big.gif" class="alignright">'); ?>
other try:
<?php the_content('<img src="<?php bloginfo('stylesheet_directory'); ?>/images/readmore_big.gif" class="alignright">'); ?>
None worked.Is there a way to put a variable in the path to the image(or any other way possible) so I won’t have to manually change the path everytime I upload to my server? I also tried the CSS way but haven’t worked either.
Thanks in advance for any responses and sorry for my not-so-good english.
- The topic ‘Read More Problem’ is closed to new replies.