HomeWORDPRESS

How to Customize Genesis Theme Archive Page

How to Customize Genesis Theme Archive Page
Like Tweet Pin it Share Share Email

Genesis Theme Archive Page

The default Genesis theme Archive page template is one of the best template available along with Genesis Theme Framework. It creates a beautiful sitemap for your website with all the pages, categories, tags, author, recent posts.


Download Genesis Theme Today & Start a Website/Blog:
Genesis Framework


 There is no problem in using it but what if you have some pages which you don’t want to show in your Archive Page? What if you don’t want to show your secondary/tertiary pages or child pages to your visitors in Archive Page? For example, your What if you don’t want to show your secondary/tertiary pages or child pages to your visitors? For example, your page “Checkout Page”?


Let the World Know


In order to customize your default Genesis Theme archive page template, you will need to duplicate and modify the page_archive.php file and then copy it to the Sample Genesis Theme root folder.

IMPORTANT: This customization is only for Genesis Child Theme Template Version: 2.2.2. Also, I recommend that you make these changes on a test website in case your changes face issues with his change. If you don’t have a test website and these changes cause errors in your live website then simply delete page_archive.php from your child theme.

So, are you ready to make this customization? Below is the step-by-step process to customize the Genesis Theme default archive page –  

The default Genesis Theme Archive page have following items:

  1. Pages
  2. Categories
  3. Author
  4. Monthly
  5. Recent Posts

Copy Code of Genesis Theme default page_archive.php File:

  1. Login to C-Panel.
  2. Locate File Manager and go to your website root folder. See the image below.Genesis Theme Archive Page C Panel
  3. Now locate the Genesis Theme Folder and locate page_archive.php file.Genesis Theme Archive Page archive-page php
  4. Open the page_archive.php file view mode.Genesis Theme Archive page View Archive File
  5. Copy the code from the page_archive.php and paste it to some safe location as we will need it later on.


You May Also Want To Learn:

How to lock your free download item from visitors
How To Open WordPress Menu Item In A New Tab / Window
How To Add A Home Link To WordPress Menu

Customization of page_archive.php file –

  1. Create a new .php file(you can use Notepad++) and paste the code that you have copied from above steps.
  2. In the file manager, open your Genesis theme child folder and upload the newly created page_archive.php file.Genesis Theme Archive Page Genesis Child Theme Page_archive
  3. Now go to your WordPress dashboard > Appearance > Editor
  4. Open newly added page_archive.php template file.
    Genesis Theme Archive page Template in Editor
  5. Copy the below code and paste it to page_archive.php template file. You can also copy part of the code for the function genesis_page_archive_content()
  6. Now modify content inside genesis_page_archive_content() function.

The following examples demonstrate some basic changes:

Remove the Authors List

To remove the authors list, find the following code and delete it:

<h4><?php _e( ‘Authors:’, ‘genesis’ ); ?></h4>
<ul>
<?php wp_list_authors( ‘exclude_admin=0&optioncount=1’ ); ?>
</ul>

Remove the Monthly List

To remove the monthly list, find the following code and delete it:

<h4><?php _e( ‘Monthly:’, ‘genesis’ ); ?></h4>
<ul>
<?php wp_get_archives( ‘type=monthly’ ); ?>
</ul>

Change the Number of Recent Posts

To change the number of recent posts, change limit=100; for example, change 100 to 50 to show only 50 recent posts in the archive page:

<?php wp_get_archives( ‘type=postbypost&limit=100’ ); ?>

Change the List Title

To change the Monthly list title to Posts by Month, find the following code:

<h4><?php _e( ‘Monthly:’, ‘genesis’ ); ?></h4>

and change it to:

<h4><?php _e( ‘Posts by Month:’, ‘genesis’ ); ?></h4>

Add Custom HTML Content

You can add custom HTML content anywhere in the page.

For example, if you want to add custom text AFTER the Posts by Month list title, find the following code:

<h4><?php _e( ‘Posts by Month:’, ‘genesis’ ); ?></h4>
<ul>
<?php wp_get_archives( ‘type=monthly’ ); ?>
</ul>

and change it to:

<h4><?php _e( ‘Posts by Month:’, ‘genesis’ ); ?></h4>
<p>List of Monthly Top Articles:</p>
<ul>
<?php wp_get_archives( ‘type=monthly’ ); ?>

Once you are satisfied with the changes in page_archive.php, update the file in the editor.

Now, Create a new Page and assign the Archive template. If you want to add introduction text above the archive page, enter it on this page.

Genesis Theme Archive Page Template Selection

Comments (2)

  • Hello Harpreet – I have a related question about your post. I’m trying to get rid of duplicate images that are displayed in my category archives. Whenever I click on any category, each post has the featured image of the post displayed twice (example from my test site: https://tamtam.cafefernando.com/best-of/). Is there anyway I can get rid of one them by entering some code in the page-archive.php (after I move it under the child theme I assume)? The developer of the child theme suggests that I choose to show excerpts only for content archives to solve the problem. It didn’t work but even if it did this solution doesn’t work for me as my home page displays latest posts and showing excerpts only also effects how the home page displays those posts. Many thanks in advance.

    Reply
    • Hi, I’m not sure I understand your issue completely. It would be great if you can share me exactly what is the issue you are facing again. Thanks!

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

sixteen − 10 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.