Change $myposts = get_posts( 'numberposts=6&offset=$debut') to $myposts = get_posts( 'numberposts=6&category_name=home-slider&offset=$debut')
OR
$myposts = get_posts( 'numberposts=6&category=1&offset=$debut')
replace 1 with your category ID
Hope this helps
Related Posts:
- is_category() in pre_get_posts strange error
- Rearranging posts based on categories
- Custom Query to search through categories
- How to query all posts of a specific category, and any other category combination
- is_category in pre_get_posts results in php notices
- Query the Loop without breaking it
- How to Check if a Child Category is Being Queried
- How Do I Merge Categories With phpMyAdmin
- Category archive page – loop through posts of certain tag (with pagination) – pre_get_posts
- If newest post of category is newest post in general, skip first post of category
- Disallow categories from this MySQL query
- Include posts from feature category in pre_get_posts
- How to display posts under a specific subcategory of a given category
- get_the_category and echo out link to child-most/deepest category
- query in category.php repeats itself
- Display posts separated by Category in Author’s page
- Category param redirect to post type archive
- How to get related tags based on a category?
- Show popular post by category code
- How to get latest posts from each category in regular order
- category pagination got broken suddenly
- How to query categories with Advanced Custom Fields?
- Where and when does WordPress invoke routes
- And/Or Category Query
- Exclude category from query
- Overriding default calendar to show posts from a category
- function query_posts disabling current_page_menu class
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- Using in ‘category_name’ in ‘$query->set();’?
- custom query for both category and pages using global $wpdb;
- Get categories of queried posts
- Query from multiple category (and)
- How to display posts from specific category using get_option function?
- SQL query to get posts from multiple categories but not in a category
- Conditional category query breaking?
- How to filter post from categories only if the posts appears in one of them, not the other?
- Category name for all posts getting assigned to a single random post
- Show Posts via cat+cat in URL that are in both Categories doesn’t work
- List of post categories only associated to another custom taxonomy
- how tho change number of posts in loop from specific categories
- Get category from slug list
- Issue with WordPress category search
- Querying posts from two different categories while looping inside another loop
- how to get postmeta info based on multiple categories?
- Too many categories drastically slow down my website
- How to get posts from many categories using WP_Query
- Is it possible to query the result of a query?
- show posts found in multiple categories via category_name query string?
- Match two taxonomies to display a specific content
- Category slug in in loop always the same?
- display certain category on custom template page
- Detecting top parent category fails on home page
- How to use Greek characters/letters in a query?
- Displaying posts by year
- wordpress category.php query for featured news item, broken pagination and repeating posts
- How to get parent and child sub category (Taxonomy) order to display
- 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
- Multiple Category Query
- Hide the word ‘category’ from my permalinks
- Limit get_categories to show each category once
- 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
- Listing posts under a category by date
- Display content from a specific category using cat ID not working
- Trying to create a Categorised Index (archive?) to use as my Home Page
- Filter posts by categories ajax is showing nothing
- Deleting a category from WordPress admin does it remove it completely from the database?
- Hide categories from frontend, but not admin / post editor
- Post to inherit custom category background image from parent
- Last x Posted Categories?
- Check boxes for showing categories
- Category Page Displaying all Pages
- 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
- Remove “category” from permalink with add_rewrite_rule
- Conditional Site Logo(Category Based)
- Tag Menu items based on their categories
- Accessible Subcategory URL’s pages without using .php hack
- in_category(‘category-sluga’) returns true for Archive page of Category ‘category-slugb’
- wp_list_category only showing to logged in uers
- Grouping parent categories into sections
- How to show “category” name?
- Querying Multiple Categories With Different Offsets
- filter single_cat_title avoiding the breadcrumbs
- 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?