• Hi people, thanks for you support earlier.
    I’m almost done setting up my blog: https://www.tropunk.com/myblog/
    There’s just a slight problem with my theme: As you can see, there’s a slide-panel on the top to add thumbnails of my posts. To add a thumbnail, I have to first add the image in my post and then it requires to add a custom field ‘homethumb’ and file name of the image as value. I did it but it didn’t seem to work. Then I saw the php code that generates the link for my thumbnail:
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" > <img src="<?php bloginfo('url'); ?>/wp-content/uploads/<? echo strtolower($homethumb); ?>.jpg" width="200" height="120" alt="<?php the_title(); ?>"/> </a>
    And here I figured out the error. The link generated is /wp-content/uploads/filename.jpg; whereas, the image uploaded goes to /wp-content/uploads/2010/01/filename.jpg (As the uploads are now year/month classified)

    So can anyone add the year/month variable in the link generator code?
    If not then, any mod to make my uploads stay only in one directory irrespective of time?

    Thanks for the help.
    Jugal

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jjm0109

    (@jjm0109)

    The image that you can see now is manually added in /wp-content/uploads/ ??

    Thread Starter jjm0109

    (@jjm0109)

    Solved: Unchecked the “Organize my uploads into month- and year-based folders”
    Sorry to trouble, didn’t see that before!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help editing small PHP line: Need a variable :P’ is closed to new replies.