• Skip to main content
  • Skip to primary sidebar
  • Business
  • WordPress
  • Security
  • Marketing
  • Publicity
  • Computing
  • Resources
  • Whatevs

Purely Wordpress

Just The Tech, News, and Info We Deem To Post

  • Home
  • About
  • Contact
  • Contribute
You are here: Home / Code Snippets / Override Genesis Archive Settings for CPT

Override Genesis Archive Settings for CPT

Genesis Theme Framework Code Snippets

Add the following code to your WordPress theme’s function.php file, or a functionality plugin to replace a post’s content with the post’s excerpt.

<?php

// Portfolio Archive Excerpt
add_action( 'genesis_before_loop', 'excerpt_content_specific_category' );
function excerpt_content_specific_category() {
  if (is_post_type_archive('portfolio')) {
		remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
		add_action( 'genesis_entry_content', 'do_post_content' );
	}
}
function do_post_content() {
	the_excerpt();
}

by Jack Alltrade on September 19, 2017

Filed Under: Code Snippets Tagged With: Archives, Code, Entry Content, Excerpt, Genesis Framework

Reader Interactions

Share Your Two Cents Cancel reply

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

Primary Sidebar

Categories

  • Code Snippets
  • Development
  • File Management
  • Genesis Framework
  • Hosting
  • Legacy
  • Plugins
  • SEO
  • Tech Terms
  • Themes
  • User Experience
  • User Interface
  • WordPress Core
  • WordPress Functionality

Warning! Use at your own risk!

As always, use at your own risk and remember to backup your site prior to inserting new code.

© Copyright Jack Alltrade & Associates 2025 · Purely Supplemental™ is a trademark of Jack Alltrade & Associates