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.

Portfolio Showcase bug?

  • Creator
    Topic
  • #24700
    Erik Almén
    Participant

    Hey. I’ve built a portfolio and put one item per image. Under “Theme Options” I’ve set Portfolios to “Post Display – Showcase”. Under Post Display:Showcase I’ve set 3 columns and 20 rows but this seems to be ignored. Instead the Portfolios display only 10 images and creates multiple pages if there are more than 10 items in a Portfolio. I tried to use Grid instead and that one works fine so I think there’s a bug in the showcase function. Here’s the site and an example of a portfolio with more than 10 items:

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #24701
    Erik Almén
    Participant
    #24718
    Jason Bobich
    Keymaster

    Hi Erik,

    It does look like it’s some sort of bug with specifically the post showcase display. Internally the post grid system works similarly along side each other. The post grid display for archives seems to be working fine. So, the bug must be somewhere where it was forgotten to add post showcase along side whatever the post grid is doing. I’ve now got it fixed for the next update.

    If you want to take a stab at fixing it yourself, so you can get it working now, I’ll try to explain the change. Open /framework/includes/class-tb-query.php of the theme and find this code starting on about line 528:

    // Adjust posts_per_page
    if ( $q->is_archive() ) {
    
        $config = Theme_Blvd_Frontend_Init::get_instance();
        $mode = $config->get_mode();
    
        if ( $mode == 'grid' ) {
    
            $columns = intval(themeblvd_get_option('grid_columns', null, '3'));
            $rows = intval(themeblvd_get_option('grid_rows', null, '3'));
    
            $q->set('posts_per_page', $columns*$rows);
    
        } else if ( $mode == 'list' ) {
    
            $default = get_option('posts_per_page');
            $q->set( 'posts_per_page', intval(themeblvd_get_option('list_posts_per_page', null, $default)) );
    
        }
    }

    And change it to this:

    // Adjust posts_per_page
    if ( $q->is_archive() ) {
    
        $config = Theme_Blvd_Frontend_Init::get_instance();
        $mode = $config->get_mode();
    
        if ( $mode == 'grid' || $mode == 'showcase' ) {
    
            if ( themeblvd_get_option( $mode.'_display' ) == 'masonry_paginated' ) {
    
                $num = intval( themeblvd_get_option( $mode.'_posts_per_page' ) );
    
            } else {
    
                $cols = intval( themeblvd_get_option( $mode.'_columns', null, '3' ) );
                $rows = intval( themeblvd_get_option( $mode.'_rows', null, '3' ) );
                $num = $cols*$rows;
            }
    
            $q->set('posts_per_page', $num);
    
        } else if ( $mode == 'list' ) {
    
            $q->set( 'posts_per_page', intval( themeblvd_get_option( 'list_posts_per_page', null, get_option('posts_per_page') ) ) );
    
        }
    }
    #24794
    Erik Almén
    Participant

    Excellent. Works like a charm. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.