• dear wordpress team I have been searching a lot but i dont know how to create a category slider grid i want to show up for example all the courses that have business category selected or software courses when software category is selected. i want to create like udemy website https://www.udemy.com/ in the second section they have a slider of the courses and up there are the categories Negocios, Diseño, Fotografia, etc where you select each category and down there appears a grid pictures sliders with the courses I want to create something like that but i dont know how to do it

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You can fetch any group of posts with the same category term with WP_Query class. Include a “category_name” argument when instantiating along with any other criteria like “posts_per_page” to limit the posts returned even if you are not paginating results.
    https://developer.wordpress.org/reference/classes/wp_query/

    Output the results in a loop similar to the linked examples. Achieving the slider effect is largely a matter of the correct HTML structure and CSS, plus a little JavaScript to handle scrolling. The approach is similar to how image sprites are used. Except for the posts output, it’s not any different than any other webpage, it’s not specific to WP.

    For more insight into how a slider is done, examine a similar plugin’s source code or any other similar slider whose source code is available for examination.

Viewing 1 replies (of 1 total)

The topic ‘category grid grouped by categories’ is closed to new replies.