To make the first post different you could add a post counter and change the output on the first loop.
$counter = 0
while ( $cat_posts->have_posts() ) {
$cat_posts->the_post();
$counter++;
if ( $counter == 0 ) {
// Out put the different loop
}
//Normal loop output
Related Posts:
- Using wp_category_checklist in a widget
- How to remove the parentheses from the category widget
- How to create a widgetized sidebar for every category dynamically?
- Customizing Default Categories Widget
- Display all posts with same title
- I want to create a posts widget and be able to select categories
- How to have Multiple Archives Widgets, one archive widget per category (in a different page)?
- Categories lose hierarchy order once assigned to post
- Add Icons to the Product Category Sidebar Widget WooCommerce
- How to display widgets inside a page content without a plugin?
- How do you categorize pages?
- WordPress category widget only show categories with children
- Customize WordPress widget – Product Category
- Post Count for Categories, however not to calculate a total
- How do I make the category sidebar widget (stock) display the total # of posts including those in subcategories?
- Categories widget show empty?
- Is it possible to remove from default category widget?
- how to remove the default title of Categories widget
- How to show 5 posts from specific category on related page?
- display a widget on specific category and its sub categories
- Multiple selection for wordpress widget
- How to not display subcategories in Recent Posts widget area?
- How to Sync Menu, Widgets and other masters from Main Website to its Sub Site
- Tags Instead of Category
- How to hide widget from certain category
- Last x Posted Categories?
- WordPress category filters as subcategories
- exclude certain categories form archive widget
- Conditional widget for theme template file
- Add filter for specific category only
- Exclude a category from block editor’s category widget
- How can I display the category name in the single post when using WP Blog and Widget?
- How to Change Sort Order of default WordPress Catgory Widgets?
- How to add an “All” category to the tag cloud?
- Custom file with special code of category widget
- in_category(‘category-sluga’) returns true for Archive page of Category ‘category-slugb’
- Problem with single posts not showing correct category sidebar
- How To Disable Category Hierarchy In Categories Widget?
- Customize category query in widget
- Create a category list page
- How do I use the same post slug for different Categories?
- How to display only 3 main categories, separated by commas, since they are marked in the post?
- Woocommerce product categories order [closed]
- How do I create a way for users to assign categories to a post from the frontend?
- How to hide a specific category posts in my monthly archive?
- Give specific category its own permalink structure
- How to set up sub-categories for author pages?
- Add category to custom post type automatically, using category slug
- Assign different category colours to different categories in the main menu
- wp_list_categories, Add class to all list items with children
- Display Only One Category
- Using separator with wp_list_categories
- Connecting WordPress gallery to custom categories (taxonomy)
- Multi-site or categories?
- View the latest created categories
- If statement within PHP echo
- category hierarchy level as a body class – parent cat =1, child cat=2, grandchild=3
- How to show author name only if the post is in a specific category?
- Are Category or Tag Archive Pages Possible?
- How to Exclude post from a category
- Hiding a Categories content on just the Homepage ‘Posts’?
- How to change a post category when the ACF datepicker Field is today
- Multiple Loops on category.php with pagination on last loop
- Category RSS feed doesn’t show category name
- menu using category and tags
- Have parent category contain only one post?
- Display thumbnails for certain category posts
- Hide the word ‘category’ from my permalinks
- How to modify default category widget list display?
- Building Menu from Woocommerce Product Categories
- Is there a reason I cannot get the current category in a loop?
- How to get parent category ID in single page template
- “Item not updated” when try to change category properties
- How to display sticky or latest published post on the current category page it belongs to?
- How do I add a separator to my list of terms with get_category
- Display content from a specific category using cat ID not working
- Trying to create a Categorised Index (archive?) to use as my Home Page
- Deleting a category from WordPress admin does it remove it completely from the database?
- Check boxes for showing categories
- Is there a “sensible” limit to WordPress Categories?
- Possible to make get_categories() hide_empty attribute honor excludes from post query?
- Display Category Name and Date Posted on Blog Post
- How to remove “Categories:” part after the post title? [closed]
- Editing categories crashes WordPress site
- Conditional Site Logo(Category Based)
- Tag Menu items based on their categories
- Accessible Subcategory URL’s pages without using .php hack
- wp_list_category only showing to logged in uers
- Grouping parent categories into sections
- Querying Multiple Categories With Different Offsets
- altering theme – content generated by PAGES not PORTFOLIO
- How do i add custom post types to this query?
- add new input field like category?
- WordPress excerpt for specific posts in category
- How do I get a single page navigation depending on the previous page?
- has_category not working correctly
- How to get most recent categories – categories whose most recent posts published
- How to Organize my Photo Albums?
- Set default sort order to be by ‘title’ and posts per page to ‘100’
- In category.php I need to get the next 10/previous 10 posts