This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Post slider with custom query

  • Creator
  • #17517


    I’d like to seek support to make a post slider with custom type posts data. (All in one event calendar)
    Could you advice how I can set Custom query to get custom type posts data with their category name?

    Here are conditions:
    post_type=event_post_type &&
    taxonomy_name = events_categories &&
    term = family-events

    Also I would like to take posts data as well in one query. Is it possible?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
  • #17522
    Jason Bobich


    I believe it would be formatted something like this:


    So, assuming what you stated above is correct, it would be like this:



    Hi Jason,

    Thank you for your comment.
    I tried the query, which you gave me. Now I can retrieve event data but it seems that the taxonomy is ignored… as a custom query ” events_categories=family-events” cannot get any data. Taxonomy&term are correct for sure.

    Do you have any idea?

    Jason Bobich

    You could try doing an actual tax query through PHP from your child theme, using this basic concept:

    Except, in this case, you’d want to use the filter “themeblvd_slider_auto_args” something like:

    [post_slider query="my_unique_key"]
     * Custom query for post slider
    function my_custom_posts_query( $query, $args ){
    	if( $args['query'] == 'my_unique_key' ){
    		$query = array( 
    			'post_type' => 'event_post_type',
    			'tax_query' => array(
    					'taxonomy' => 'events_categories',
    					'field' => 'slug',
    					'terms' => 'family-events'
    	return $query;
    add_filter( 'themeblvd_posts_args', 'my_custom_posts_query', 10, 2 );


    Hi Jason,

    Thank you for your reply. I added the custom query function (my_custom_posts_query) to my functions.php and call the shortcode from page. but it didn’t work. The 5 latest POST data is shown.
    Also I tried to set “Custom Query” on “Where to pull post from?” option & set “my_unique_key” on “Custom Query” option under Post slider at page builder. but no luck….

    I cleared value on Custom Query option as blank. The 5 latest POST data is shown as well.
    I modified the function to take data with other term, but the 5 latest POST data is shown as well.

    Sorry again.. do you have any idea? Appreciate your support. Thanks.

    Jason Bobich

    These are the only ways I know to query posts by a custom post type and taxonomy.

    Jason Bobich

    Is this the plugin you’re using?

    I just downloaded it and the registered custom post type is ai1ec_event and the associated, registered taxonomies are:

    1. events_categories
    2. events_tags
    3. events_feeds

    Could the issue be that you had the post type wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.