downloads Categories & Tags

Basic support is open to all members of Volatyl Themes but what about those who need a little more? That's what Volatyl Themes subscriptions are for. The Priority Support subscription gets you more detailed, personal support while the Advanced Development subscription not only includes Priority Support, but also grants you access to premium content only seen by subscribers. This premium content will help you take your Volatyl websites to the next level with advanced development techniques, integration tips, and more information on how to really put Volatyl to use. Check out the subscriptions!

The Affordable WordPress Framework Forums Basic Support downloads Categories & Tags

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  sdavis2702 4 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4536

    james bobrowski
    Participant
    Post count: 4

    is their a filter simular to your store front code

    // Filter store front item count
    function store_item_count($variable) {
        $variable = str_replace(9,6,$variable); // Change from 9 to 6
        return $variable;
    }
    add_filter('store_items_per_page','store_item_count');

    that will do the same for downloads Categories & Tags?

    basically i need to display at the least 20 downloads per Categories & Tags right now its set to 10 thanks

    #4537

    sdavis2702
    Keymaster
    Post count: 72

    Hi James!

    No there isn’t a built-in filter for the download taxonomies. They use the same value that the posts use at Dashboard -> Settings -> Reading -> Blog Pages Show at Most.

    You can use pre_get_posts to take control of download taxonomies, though. In your child theme functions file, use the following code:

    function custom_download_tax_count( $query ) {
    
    	if ( is_admin() || ! $query->is_main_query() )
    		return;
    
    	if ( $query->is_tax( 'download_category' ) || $query->is_tax( 'download_tag' ) ) {
    		$query->set( 'posts_per_page', 20 );
    		return;
    	}
    }
    add_action( 'pre_get_posts', 'custom_download_tax_count' );

    Change 20 to whatever you want it to be. And you can adjust the conditional logic there if you don’t want categories and tags to show the same count.

    I hope this helps!

    #4572

    sdavis2702
    Keymaster
    Post count: 72

    Were you able to get this sorted out, James?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.