• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to user navigation

Designody

WordPress and Genesis Tutorials

  • Get Started
  • About
  • Archive
  • Services
  • Membership
  • My Account

Change Genesis Portfolio Pro Custom Post types Labels

Last Updated on September 13, 2019Leave a Comment Favorited: 0 times

//* Add the breadcrumb navigation to portfolio archives and single pages
add_action( 'genesis_before_loop', 'add_portfolio_pro_breadcrumb' );
function add_portfolio_pro_breadcrumb() {
if ( get_post_type( $post_id ) == 'portfolio' || is_post_type_archive( 'portfolio' ) || is_tax( 'portfolio-type' ) ) {
	add_action( 'genesis_before_loop', 'genesis_do_breadcrumbs', 15 );
        }
}
// rewrite custom post type labels genesis-portfolio-pro/lib/post-types-and-taxonomies.php
add_action( 'init', 'rewrite_portfolio_custom_labels' );
function rewrite_portfolio_custom_labels() {
register_post_type( 'portfolio',
	array(
	'labels' => array(
        'name'               => __( 'Portfolios', 'post type general name' , 'genesis-portfolio-pro' ),
        'singular_name'      => __( 'Portfolio' , 'post type singular name', 'genesis-portfolio-pro' ),
        'menu_name'          => __( 'Portfolio Items', 'admin menu'             , 'genesis-portfolio-pro' ),
        'name_admin_bar'     => __( 'Portfolio Item' , 'add new on admin bar'   , 'genesis-portfolio-pro' ),
        'add_new'            => __( 'Add New'   , 'Portfolio Item'              , 'genesis-portfolio-pro' ),
        'add_new_item'       => __( 'Add New Portfolio Item'                    , 'genesis-portfolio-pro' ),
        'new_item'           => __( 'New Portfolio Item'                        , 'genesis-portfolio-pro' ),
        'edit_item'          => __( 'Edit Portfolio Item'                       , 'genesis-portfolio-pro' ),
        'view_item'          => __( 'View Portfolio Item'                       , 'genesis-portfolio-pro' ),
        'all_items'          => __( 'All Portfolio Items'                       , 'genesis-portfolio-pro' ),
        'search_items'       => __( 'Search Portfolio Items'                    , 'genesis-portfolio-pro' ),
        'parent_item_colon'  => __( 'Parent Portfolio Items:'                   , 'genesis-portfolio-pro' ),
        'not_found'          => __( 'No Portfolio Items found.'                 , 'genesis-portfolio-pro' ),
        'not_found_in_trash' => __( 'No Portfolio Items found in Trash.'        , 'genesis-portfolio-pro' )
	),
	'has_archive'  => true,
	'hierarchical' => true,
	'menu_icon'    => 'dashicons-format-gallery',
	'public'       => true,
	'rewrite'      => array( 'slug' => __( 'portfolio', 'portfolio slug' , 'genesis-portfolio-pro' ), 'with_front' => false ),
	'supports'     => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'revisions', 'page-attributes', 'genesis-seo', 'genesis-cpt-archives-settings' ),
	'taxonomies'   => array( 'portfolio-type' ),
	
	)
);
}

 

Categories: Free Content, Snippets

Reader Interactions

Leave a Reply Cancel reply

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

You should use these Shortcodes tag and attributes while sharing the code:
Example: [html]I <3 HTML[/html] → [html][css][php][js][java][json][raw]

Primary Sidebar

WPEngine WordPress Hosting, Perfected.

Hosting You are looking for?.
Perfect solution for small business to global enterprise.

Learn more

StudioPress Genesis Theme Framework

The No.1 Theme Provider.
Creative, SEO rich Theme for all niche projects.

Learn more

Categories

  • Free Content
  • Genesis Tutorials
  • Premium Content
  • Snippets
  • What's New?
  • WordPress Tutorials

Tag Cloud

Archive Background Section blog center logo columns conditional tags CSS CSS Grid custom Customizer custom post type Custom Post Types custom template Custom Widget effect Featured Image front-page Genesis Genesis Sample header right hero section Image Background js layout Logo menu navigation Navigation Menu Nav Menu newsletter post page related posts responsive menu search search widget Shrinking Logo site header slide in-out Split Navigation Stylesheet Template Utility Bar Video Background widgets WordPress

Built with Genesis Framework + WordPress

  • Contact
  • FAQ
  • Disclaimer
  • Privacy Policy
  • Copyright Policy
  • Terms of Service