Testimonials

Tagged: 

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

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

  • Author
    Posts
  • #6860
    Dean
    Spectator

    Hey Merv. Thanks for the support to date so far has been awesome.

    How do I display all the testimonials on a single page?

    #6902
    Merv Barrett
    Keymaster

    Using the parent page of http://benchmarknational.com.au/testimonial/

    Currently you have 3

    You can override that custom post type with a simple function placed into your theme functions.php file.
    Each listing type or testimonial or staff member are a custom post type and can be over-ridden independently with a specific function.

    In WordPress under Dashboard > Settings > Reading is your default number usually 10.

    <?php
    // Staff Directory Query to increase post count
    function my_epl_archive_testimonial_query( $query ) {
        if ( $query->is_main_query() && is_post_type_archive( 'testimonial' ) ) {
            // Display 50 posts for a custom post type called 'testimonial'
            $query->set( 'posts_per_page', 50 );
            return;
        }
    }
    add_action( 'pre_get_posts', 'my_epl_archive_testimonial_query' ); ?>

    So lets say you want to change listings to 15 so the grid is better formatted eg 5 rows of 3 you can add this to your theme functions.php file.

    <?php
    // Property Query to increase post count
    function my_epl_archive_property_query( $query ) {
        if ( $query->is_main_query() && is_post_type_archive( 'property' ) ) {
            // Display 15 posts for a custom post type called 'property'
            $query->set( 'posts_per_page', 15 );
            return;
        }
    }
    add_action( 'pre_get_posts', 'my_epl_archive_property_query' ); ?>
    #6903
    Merv Barrett
    Keymaster

    Oh and thanks! Happy to help

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Priority Support’ is closed to new topics and replies.