• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Filter To Modify Genesis Archive Page Sitemap Template

This code enables you to add, remove or edit the default output generated by the page_archive.php file included in Genesis.

This file which is native to Genesis can be used via any Genesis child theme simply by selecting the Archive option from the drop down menu in the Page Attributes box on any Page Edit screen.

sitemap-template

The archive outputs a sitemap which includes headings and a list of pages, archives and recent posts.

The filter includes the following functions you can remove, add to or modify:

wp_list_pages( 'title_li=&echo=0' ) );
wp_list_categories( 'sort_column=name&title_li=&echo=0' ) );
wp_list_authors( 'exclude_admin=0&optioncount=1&echo=0' ) );
wp_get_archives( 'type=monthly&echo=0' ) );
wp_get_archives( 'type=postbypost&limit=100&echo=0' ) );

Here’s the code you simply add to the end of your child themes functions file and modify to your liking :

Register for full access

Related Code Snippets

  • Modify The Genesis Sitemap
  • Remove Page From Genesis Sitemap Archive

Reader Interactions

Comments

  1. jmelee1221 says

    August 20, 2017 at 2:42 pm

    Is it possible to filter the authors by who wrote the most amount of posts first – numerical order from the highest amount to the lowest amount?

    Log in to Reply
    • jmelee1221 says

      August 20, 2017 at 2:47 pm

      I created a custom page_archive.php and used this code if it matters to give me the page to show – Monthly // Authors // Recent 100 posts. I just need to be able to have the Author section not by alphabetical order but my numerical order of who wrote the most amount of posts

      CODE USED:

      <?php
      }

      genesis();

      PAGE LINK of currrent page: http://weheartthis.com/archives/

      Log in to Reply
      • jmelee1221 says

        August 20, 2017 at 2:49 pm

        Sorry it didnt post the code. This is what I used for the page_archive.php

        <?php
        }

        genesis();

        Log in to Reply
        • Brad Dalton says

          August 20, 2017 at 4:23 pm

          Send me the file please. brad@wpsites.net

          Log in to Reply
        • Brad Dalton says

          August 20, 2017 at 4:34 pm

          Tested this line of code and it works

          See parameters

          Log in to Reply
          • jmelee1221 says

            August 20, 2017 at 4:39 pm

            It made the authors disappear completely.

            LINK>> http://weheartthis.com/archives/

          • jmelee1221 says

            August 20, 2017 at 4:44 pm

            Never mind I got it. The last 0 in the code needs to be a 1 and it works. THANKSSSSSS a million Brad!

  2. Rita says

    August 14, 2017 at 4:00 pm

    Would it be possible to get a yearly archive instead of a monthly?

    That is instead of january 2017, february 2017 and so on have it by year:
    2017 jan feb march april….
    2016 jan feb march april….

    Log in to Reply
    • Brad Dalton says

      August 14, 2017 at 4:21 pm

      Change monthly to yearly in the code like this.

      Log in to Reply
      • jmelee1221 says

        August 20, 2017 at 4:55 pm

        Is there a way possible to get the code above in raw? I am not 100% if there is a ; in it or not. Sorry :/

        Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.