post image problem

resolved (23 posts) (3 voices)

  1. matty_40rulz
    Member

    Hey guys,
    On my home page i have 5 posts, the bottom 2 posts i changed the photo and it all displays correctly until i click on the image and it displays the old photo instead of the new one i have checked all of the settings and the paths are correct and also i have deleted the old images from the website so im not sure how it is still loading them.

    http://dentist-adelaide.net.au

    Posted 3 years ago #
  2. matty_40rulz
    Member

    Actually on second thought what i think might be better is if instead of clicking the post image on the homepage and it opening to an enlarged version of the image, can i make it so that if you click the image it just opens the post so performing the same task as the read more button. Im having to many issues with images not loading on different browsers so itd be great if this was possible.

    http://dentist-adelaide.net.au

    Posted 3 years ago #
  3. Ruderic
    Support

    Hello,

    In order to have the posts in the homepage you modified a PHP file, right?

    Could you please provide us that file?

    Posted 3 years ago #
  4. matty_40rulz
    Member

    I am having trouble uploading the file but I got the file from this thread posted by elliott featured-custom.zip it is the 12th post

    http://mysitemyway.com/support/topic/front-page-with-portfolio-below-the-slider

    Posted 3 years ago #
  5. Elliott
    Support

    Hello matty_40rulz,

    Open up your featured-custom.php file and on line 186 you should see this,

    <a class="load_portfolio_img" style = 'display: block !important; visibility: visible !important; opacity: 1 !important;' rel="lightbox[portfolio]" href="<?php echo $portfolio_video_link; ?>">

    Change it like this,

    <a class="load_portfolio_img" style = 'display: block !important; visibility: visible !important; opacity: 1 !important;' href="<?php the_permalink(); ?>">

    That will send you to the post when you click on the image. Let us know if that works for you matty_40rulz.

    Posted 3 years ago #
  6. matty_40rulz
    Member

    Worked like a charm elliott thanks.

    Posted 3 years ago #
  7. matty_40rulz
    Member

    hey sorry one more question now that i have made those changes how would i go about creating alt tags for those images on the homepage?

    Posted 3 years ago #
  8. Elliott
    Support

    Fine line 187 which should look like this,

    <span class=""><img src="<?php echo $gallery_image_url; ?>" alt="" /></span>

    Change it like this,

    <span class=""><img src="<?php echo $gallery_image_url; ?>" alt="<?php echo get_post_meta($post->ID, 'alt_tag', true); ?>" /></span>

    And then in each post create a new custom field with a name of "alt_tag" and a value of whatever you want the alt tag for that image to be.

    Let us know if this works for you matty_40rulz.

    Posted 3 years ago #
  9. matty_40rulz
    Member

    where do i create a custom field in the actuall post or somewhere else. and how do i write the alt tag can you give an example thanks. And do i modify line 187 in the featured-custom file.

    Posted 3 years ago #
  10. Elliott
    Support

    Hello matty_40rulz,

    Yes you would need to modify line 187 in your featured-custom.php file.

    You can create a custom field when editing your post. It might not display by default so you will have to hit the "Screen Options" button in the top right corner and check it to display. (see attached image)

    Attachments

    1. 2.jpg (40 KB, 0 downloads) 3 years old
    2. 1.jpg (9.9 KB, 0 downloads) 3 years old
    Posted 3 years ago #
  11. matty_40rulz
    Member

    i dont think it is working i have done everything you have told me are u abe to check it out?

    http://dentist-adelaide.net.au

    Posted 3 years ago #
  12. Ruderic
    Support

    Hi,

    Could you please provide us your login details? So we can take a look at your posts and your template files, in order to check that you actually made the correct modifications.

    Posted 3 years ago #
  13. matty_40rulz
    Member

    sent you a pm with the details Ruderic

    Posted 3 years ago #
  14. matty_40rulz
    Member

    sent you a pm to elliott with login details as i think youll get to it first.

    Posted 3 years ago #
  15. Ruderic
    Support

    Hi,

    I found the problem. This is the code that Elliot provided you:

    <span class=""><img src="<?php echo $gallery_image_url; ?>" alt="<?php echo get_post_meta($post->ID, 'alt_tag', true); ?>" /></span>

    You should replace it with:

    <span class=""><img src="<?php echo $gallery_image_url; ?>" alt="<?php echo get_post_meta($post->ID, 'alt_tag_custom', true); ?>" /></span>

    The custom field in your posts is OK, so this tweak should add the "alt" attribute to your images. Please try it and let us know the results.

    Posted 3 years ago #
  16. matty_40rulz
    Member

    hey I still do not think it is working I made the changes you suggested ruderic but still nothing any more ideas?

    Posted 3 years ago #
  17. Elliott
    Support

    Go ahead and send us an FTP login so we can take a closer look matty_40rulz.

    Posted 3 years ago #
  18. matty_40rulz
    Member

    pm sent to you Elliott with ftp details.

    Posted 3 years ago #
  19. Elliott
    Support

    I just checked your site and the alt tags are displaying matty_40rulz. Try clearing your browser cache and refresh any caching related plugins you might have intsalled.

    Posted 3 years ago #
  20. matty_40rulz
    Member

    the alt tags that are displaying within the post are using the post name as the alt tag not what i am writing in the custom field?

    Posted 3 years ago #
  21. Elliott
    Support

    I updated your custom field to "test" and it is displaying as the alt tag on your homepage. If your not seeing it then try refreshing your cache or refresh any caching related plugins you might have installed.

    Posted 3 years ago #
  22. matty_40rulz
    Member

    hey elliott its not displaying for me but seeing as you say its working ill take your word for it thanks so much for all of your help!

    Posted 3 years ago #
  23. Elliott
    Support

    Here is an image of what I am seeing. I'll go ahead and mark this as resolved but if you have any other questions then feel free to open it back up matty_40rulz.

    Attachments

    1. 1.jpg (96.6 KB, 0 downloads) 3 years old
    Posted 3 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme