• Hi Everybody,

    Not sure if this is the right section to put this in, but I’ve managed to tweak my functions.php file to add thumbnails to the ‘Recent Posts’ widget that displays recent Blog Posts in my sidebar but am really struggling to do the same for my Pages.

    Can anyone suggest anything please? I’ve searched online for several weeks now, but seem to be going around in circles …

    Thanks,
    SN.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi SN,

    there is no general answer for this as it always depends on the widget / theme you are using. It’s possible that you’ll need to modify the widget to support thumbnails for pages.

    Regards,
    Michael

    Thread Starter SkyNetworks

    (@skynetworks)

    Hi Michael.

    I thought that might be the case.

    I’m just using the default ‘Pages’ and ‘Recent Posts’ widgets that are selectable from the WP Admin pages, and I’m using is a hacked version of the zeeFocus theme, but I’ve made so many changes to it (over 200) that it’s barely recognisable – which I why I didn’t post this in the ‘Themes’ section.

    The line of code I added to my functions file was ‘<?php the_post_thumbnail(); ?>’. Works fine for blog posts, but Just can’t fathom out how to get that to apply to Pages listed in the Sidebar widget as well. Needless to say, it’s driving me nuts ??

    Thanks anyway x.

    The default WordPress “Pages” widget does not support thumbnails. So you might want to search for a plugin that includes a pages widget with thumbnails or ask the theme developer if the theme does provide this kind of widget somehow.

    Regards,
    Michael

    Thread Starter SkyNetworks

    (@skynetworks)

    Ok. Thanks Michael – really appreciate it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding Thumbnail Images to Pages Widget’ is closed to new replies.