Recent Posts Widget – double images

  • Megan
    Megan
    Newbie 60 points
    August 22, 2013 at 4:16 pm

    I need to look at the code that outputs the recent posts in the recent posts widget – the reason being that for some reason it is showing 2 images and not one (see attached) looks like it is repeating the attached image (and link) for the first item all along with the attached images of the other items – can you tell me where that code is located or give advice?

    the generated html looks like:

    [code title=”generated html”]
    <div class=’core_widgets_listings’><div class=”block”><div class=”block-title”><h3><span>Recent Articles</span></h3></div><div class=”block-content widget”>

    • <div class=’span3′>fallback-one-image-3016</div>
      <div class=’span9′>fallback-one-image-3016<h1><span class=’wlt_shortcode_TITLE’>The American Montessori Society’s Teacher Education Scholarships</span></h1><span class=’wlt_shortcode_excerpt’>Every year, the American Montessori Society awards teacher education scholarships to aspiring Montessori teachers.</span></div><div class=’clearfix’></div>
    • <div class=’span3′>fallback-one-image-2978</div>
      <div class=’span9′>fallback-one-image-3016<h1><span class=’wlt_shortcode_TITLE’>T.E.A.C.H. Early Childhood® Scholarships For Child Care Workers</span></h1><span class=’wlt_shortcode_excerpt’>Every year, the American Montessori Society awards teacher education scholarships to aspiring Montessori teachers.</span></div><div class=’clearfix’></div>
    • <div class=’span3′>fallback-one-image-2972</div>
      [/code]
    Attachments:
    You must be logged in to view attached files.
  • Megan
    Megan
    Newbie 60 points
    August 22, 2013 at 5:10 pm

    OK so now I have found when I click on a post and go to the page to read it, then the recent posts widget shows just the one correct image on that page, but on any of the pages that show a list of posts (such as a category page) it shows 2 images

    thanks, megan

  • Megan
    Megan
    Newbie 60 points
    August 22, 2013 at 6:25 pm

    I just realized I have been wrong in the title of the widget I am using -I am using the WLT Recent Listings widget and that is the one that is showing double images and also when I check the front page only, it disappears from the front page. thanks, megan

  • Megan
    Megan
    Newbie 60 points
    August 23, 2013 at 10:28 pm

    Well I isolated the bit of code where the unwanted image is taking place but I don’t know php so I don’t know how to fix it

    in the class_white_label_themes.php on about line 8784

    .$CORE->ITEM_CONTENT($post, str_replace(“[ID]”,$post->ID,$instance[‘te’])).

    I suspect one of the vars has the code for image from the first post accidentally stuck in it and so it repeats for every row

    can anyone tell me how to fix this??

    thanks, Megan

  • Megan
    Megan
    Newbie 60 points
    August 25, 2013 at 8:59 pm

    OK well for some reason the double images has to do with the custom query

    if I use post_type=listing_type&posts_per_page=8 then there is just a single image
    but if I use post_type=post&posts_per_page=8 then I get the double images as per the attached screen shot in my original post

    why would this be so???

    thanks, Megan

Viewing 5 posts - 1 through 5 (of 5 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes