Title: bigevilbrain's Replies | WordPress.org

---

# bigevilbrain

  [  ](https://wordpress.org/support/users/bigevilbrain/)

 *   [Profile](https://wordpress.org/support/users/bigevilbrain/)
 *   [Topics Started](https://wordpress.org/support/users/bigevilbrain/topics/)
 *   [Replies Created](https://wordpress.org/support/users/bigevilbrain/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/bigevilbrain/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/bigevilbrain/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/bigevilbrain/engagements/)
 *   [Favorites](https://wordpress.org/support/users/bigevilbrain/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Pagination with custom post type listing](https://wordpress.org/support/topic/pagination-with-custom-post-type-listing/)
 *  [bigevilbrain](https://wordpress.org/support/users/bigevilbrain/)
 * (@bigevilbrain)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/pagination-with-custom-post-type-listing/page/2/#post-1566786)
 * [@rafaelxy](https://wordpress.org/support/users/rafaelxy/): Thanks a ton! This
   also worked for me. Perfect.
 * I’ve got two custom post types I’m using: caststudy and partner.
 * I switched my page-slug to “case-study” (from “case-studies”) and to “partner”(
   from “partners”) and the pagination works!
 * **“Archive” Pages**
    page-case-study.php page-partner.php
 * **Single View**
    single-casestudy.php single-partner.php
 * I also figured out a way to fool **wp_list_pages()** into highlighting the correct“
   parent page” when viewing any single custom post-type “page” (rather than highlighting
   the “blog” page.)
 * This is really ugly but it works.
 *     ```
       <?php
       $defaults = array(
       'depth'			=> 0,
       'title_li'		=> '',
       'echo'			=> 1,
       'sort_column'	=> 'menu_order, post_title',
       'sort_order'	=> 'asc',
       'link_before'	=> '',
       'link_after'	=> '');
   
       global $post, $wp_query;
   
       if (get_query_var('post_type') == 'casestudy') {
       // Load up the 'Case Studies' page to fool WP.
       $page = get_page_by_title('Case Studies');
   
       $temp_post = $post; $temp_query = $wp_query; $wp_query = null;
   
       $wp_query = new WP_Query();
       $wp_query->query(array('page_id' => $page->ID));
       wp_list_pages($defaults);
   
       // Restore previous wp_query.
       $wp_query = null; $wp_query = $temp_query; $post = $temp_post;
       } else if (get_query_var('post_type') == 'partner') {
       // Load up the 'Partners' page to fool WP.
       $page = get_page_by_title('Partners');
   
       $temp_post = $post; $temp = $wp_query; $wp_query = null;
   
       $wp_query = new WP_Query();
       $wp_query->query(array('page_id' => $page->ID));
       wp_list_pages($defaults);
   
       // Restore previous wp_query.
       $wp_query = null; $wp_query = $temp_query; $temp_query = $temp_post;
       } else {
       // A normal page.
       wp_list_pages($defaults);
       }
       ?>
       ```
   
 * Hope that helps someone.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [How to remove alt/title of links?](https://wordpress.org/support/topic/how-to-remove-alttitle-of-links/)
 *  [bigevilbrain](https://wordpress.org/support/users/bigevilbrain/)
 * (@bigevilbrain)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/how-to-remove-alttitle-of-links/#post-1430856)
 * Thanks Veganist, this help me also.

Viewing 2 replies - 1 through 2 (of 2 total)