Limited items listed in Recent Posts sidebar

Hi. Is there a way to filter the posts listed in the sidebar? As you can see from the screen grab, there are multiple posts that appear to be duplicated. Actually, they’re not. The thing that separates them are Custom Fields. For instance, is there a way to limit posts that are listed to only those whose custom field is set to Video = Yes (as shown in the bottom screen grab)? Thank you.

Hi There,

Are you using recent post element for that? Unfortunately, there’s no option to for custom field filter. It might be possible with customization that is outside the scope of our support. The alternative that I can suggest is to add each post on specific category then filter the recent post using category.

Hope this helps.

Actually, those recent posts were from WP itself using their widget in the main sidebar. Your idea about using a category filter is fine. I added the Recent Post shortcode to the sidebar. ([recent_posts count=“3” no_image=“true” orientation=“vertical” category=“no-media”]). In the attached image, you can the shortcode at top and the WP widget at the bottom (in purple).

I prefer the look of the purple WP widget over the shortcode. Is there either a way to either…

  • Make the text of the shortcode much smaller, and also wrap (like the purple WP recent posts) so we can see the whole title of the post, or
  • To filter the WP Recent Post widget by category so I maintain its look, which I like?

Thanks!

Hello There,

Thanks for updating in!

a.) Make the text of the shortcode much smaller, and also wrap (like the purple WP recent posts) so we can see the whole title of the post

  • To resolve this, please add the following CSS code in the X > Launch > Theme Options > Global CSS (http://prntscr.com/evui3r)
.widget .x-recent-posts .no-image,
.widget .x-recent-posts .x-recent-posts-content {
    border: none;
    padding: 0;
}

.widget .x-recent-posts a {
    background-color: transparent;
}

.widget .x-recent-posts .h-recent-posts {
    text-overflow:initial;
    white-space: normal;
}

2.) To filter the WP Recent Post widget by category so I maintain its look, which I like?

Hope this helps.

Thanks very much! Recent Posts Extended widget, mentioned in that article, worked very well.

Glad to hear you’ve found a good solution for your needs @KennyReff! :slight_smile: