Support Forums for LiveMesh Themes & Plugins › Forums › Invent Theme Support › Is there a way to remove the pagination functionality from Faculty template?
Tagged: faculty
- This topic has 6 replies, 2 voices, and was last updated 7 years, 2 months ago by Harshith Anantharam Sharma.
-
AuthorPosts
-
September 25, 2017 at 11:30 pm #27618Harshith Anantharam SharmaParticipant
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!
September 26, 2017 at 8:00 am #27622VeenaModerator1. 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.
October 5, 2017 at 10:13 am #27716Harshith Anantharam SharmaParticipantThis 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?
October 6, 2017 at 8:36 am #27731VeenaModeratorThis 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.
October 8, 2017 at 6:44 am #27747Harshith Anantharam SharmaParticipantPlease find the URLbelow, where pagination still displays:
http://www.umdsmartgrowth.org/specialization/faculty/
However, the pagination does not display in the following page:
October 11, 2017 at 1:12 pm #27783VeenaModeratorPls 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); } }
October 12, 2017 at 10:44 am #27790Harshith Anantharam SharmaParticipantThanks a lot! It worked
-
AuthorPosts
- The topic ‘Is there a way to remove the pagination functionality from Faculty template?’ is closed to new replies.