You can do this easily with a custom query. Try something like this (I haven’t tested this code, but it should be fine): (EDIT: Changed below to “get_the_post_thumbnail”, also added $post->ID)
<ul>
<?php
$args = array(
'cat' => '17',
'posts_per_page'=>20
);
$sponsors_query = new WP_Query( $args );
while ( $sponsors_query->have_posts() ) : $sponsors_query->the_post();
echo '<li>' . get_the_post_thumbnail($post->ID, array(50,50)) . '</li>';
endwhile;
wp_reset_postdata();
?>
</ul>
Related Posts:
- Best way to overide plugin CSS?
- Ways to create a paid wordpress plugin?
- OpenID for WordPress 3.x? [duplicate]
- Edit plugin without hooks in functions.php
- How to register_sidebar() without messing up the order?
- Is dynamic forms/entries possible in Widget?
- Template for different category on woocommerce product [closed]
- Reduce nonce lifespan
- WordPress plugin DB upgrade
- Trigger a custom wordpress plugin with a linux cron
- Have Plugin Handle Specific URLs
- Allow a userclass to save a page as a draft – but not publish w/o admin approval
- Custom options page checkbox will not save, despite working with text
- Security checking in meta_box save is reluctant?
- What causes an Unexpected HTTP Error within install plugins?
- How do I write into a file (css)
- Cache WP remote_get HTTP Response using Transients
- What is an arbitrary URL?
- Is there a way to share your Facebook Page’s stream on a WordPress page or post?
- How to add equivalent of php include to one page (as plugin?)
- Allow users of my plugin to define their own shortcode rather than use mine?
- CRUD and Frontend show from a custom table without shortcode
- Child Pages Short Code plug-in and hover capabilities?
- Timed Exam test for candidates [closed]
- There has been a critical error on your website. Please check your site admin email inbox for instructions.Learn more about debugging in WordPress [closed]
- How to call WordPress function other files
- Submit page limited in time to upload image
- Modal suddenly disapearring [closed]
- Plugin alternative to Normalize.CSS? [closed]
- media page returnig to 404 in rtmedia [closed]
- Plugin can not display in my custom theme
- How do I show a different homepage to logged in and non-logged in users?
- Check if SEO plugin installed
- Cannot access my wp-admin after installing Gzip compression [closed]
- WordPress Plugin manipulate have_posts()
- Where are theme codes located for WordPress?
- call_user_func_array() expects parameter 1 to be a valid callback
- Inserting custom PHP script on homepage
- Enqueue stylesheet in plugin for wp-login.php
- a weird attribute on every html tag
- WordPress override archive page template using a plugin
- How can i delete options on plugin uninstallation?
- Add bcc to contact from on wordpress
- Date format – Meta Box plugin
- Which wordpress theme is compatible Optima Express theme (real estate inventory) plugin?
- Fullscreen gallery plugin [closed]
- wp_enqueue_scripts
- List category posts displaying limited posts
- Woocommerce Coupon Menu and Marketing Menu missing After “Coupons can now be managed from Marketing > Coupons.” [closed]
- “uagb/section and uagb/columns block”
- woocommerce search by sku and title ajax
- WordPress Site is Broken, Cannot see wp-admin page [closed]
- How to remove menus items from Menu section from WordPress theme customizer
- Block installation of specific plugins on a server level (CentOS 6 x64)
- Is there a way to easily manage Project options (custom-fields)
- Fetch CSS of posts
- Plugin generated unexpected output – No PHP errors
- Changing plugin options from theme functions file?
- Fancybox plugin: triggering on href attribute
- Gravatar alternative for WordPress
- Single Domain/Multiple Domain installation restrictions allowed for plugins?
- Plugin to display weekly schedule that can be edited via admin panel
- Automatic WordPress Backup Plugin works, but says it’s not
- Replace the_content with ACF Flexible Content via function
- Scrape key check failed. Please try again
- Translations not appended even strings are edited
- Error: call_user_func_array() expects parameter 1 to be a valid callback
- How to redirect users to the last page viewed
- Referrer Question From Server Log
- WordPress Shortcodes – Return $Variable
- Woocommerce convert simple products to variations
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- Disable Plugin or JS on Specific Admin URLs
- Reverse count page view and show on other page
- Block content rendering on the top just below body tag
- How to bookmark pages that have dynamic URLs?
- Copying content from my other websites
- WordPress “template_include” Filter Not Working
- Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
- Allow vendors on a WordPress site to pick from a gallery of pre-selected images when choosing product’s featured image
- Update and remove buttons are hidden in plugin’s page
- How can I automatically send an email with an excel file containing submissions for a form rather than an email per submission?
- Overwrite user role
- How can I easily add code under the tag without using hooks? [duplicate]
- Include plugin form in the home page
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- Differentiate attachment pages in search results
- Is saving multiple options or saving multiple items in one option better?
- How to set up year view for datepicker in The Events Calendar plugin?
- Photos do not show on SEO platform built into a wordpress plugin
- Building a simple “settings” plugin to change textstrings on the home page
- Trouble Removing Plugin [closed]
- WordPress site show white screen after updating some plugins (URGENT) [closed]
- Output plugin post like system count [closed]
- How to develop an extension for a simple form post and post back? [closed]
- What can I do to customize a widget provided with this plugin? from where have I to start?
- plugin translations not reflected in admin dashboard
- Elementor with system colors instead of kit colors [closed]
- Shortcode inside a redirect [closed]
- Attachement title in wpallimport