Is there a way to remove the pagination functionality from Faculty template?

Support Forums for LiveMesh Themes & Plugins Forums Invent Theme Support Is there a way to remove the pagination functionality from Faculty template?

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27618

    Hi

    I had a couple of questions related to Faculty and Staff profile pages and layout

    1) I am currently working on a website which uses the Invent WordPress theme. I noticed that the theme has a default way in which Faculty/Staff profiles can be added into the application. However, the faculty template is also adding a pagination functionality by default in the faculty page. I would like to remove this functionality, and would like all the profiles to be displayed on the same page. Is there any way to do this?

    2) All the staff profiles I add currently have the default URL structure of domain.com/faculty/….. I would like to change this to something that suites our requirements. Could you please let me know if that is possible?

    Thanks!

    #27622
    Veena
    Moderator

    1. Pls set post per page value to a bigger number in file loop-staff.php at line no:47.

    'posts_per_page' => 8,
    

    2. Pls try to change the slug in file framework/presentation/custom-post-types.php at line no:319

     'rewrite' => array( 'slug' => 'faculty' ),
    

    After updating the code just make sure that you flush the rewrite rules by visiting Settings > Permalinks. Otherwise you’ll still see the old links.

    #27716

    This worked for the page that shows all the posts, but the pagination still exists when I select the pages for individual specializations. Could you please let me know how will I be able to remove for them as well.

    I was not able to find the file framework/presentation/custom-post-types.php. Could you please let me know where can I find the same?

    Is there any way to order the way the specializations are displayed on the staff main page?

    #27731
    Veena
    Moderator

    This worked for the page that shows all the posts, but the pagination still exists when I select the pages for individual specializations – Can you pls share specific page link?

    In invent theme folder pls search for framework folder > presentation folder > custom-post-types.php file.

    #27747

    Please find the URLbelow, where pagination still displays:

    http://www.umdsmartgrowth.org/specialization/faculty/

    However, the pagination does not display in the following page:

    http://www.umdsmartgrowth.org/who-we-are/people/

    #27783
    Veena
    Moderator

    Pls have the below code in your child theme’s functions.php file –

    
    add_action('pre_get_posts', 'change_tax_num_of_posts' );
    function change_tax_num_of_posts( $wp_query ) {  
        if( is_tax('specialization')) {
            $wp_query->set('posts_per_page', -1);
        }
    }
    
    #27790

    Thanks a lot! It worked

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Is there a way to remove the pagination functionality from Faculty template?’ is closed to new replies.