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

PopWP

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, 2019 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

Primary Sidebar

Search

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 canvas menu center logo columns conditional tags CSS CSS Grid custom Customizer custom post type Custom Post Types custom template Custom Widget effect eNews Extended Featured Image front-page Genesis Genesis Sample header right hero section Image Background js layout left menu Logo menu Navigation Menu newsletter post page related posts responsive menu search search widget Shrinking Logo site header slide in-out Stylesheet Template Utility Bar Video Background widgets WordPress

Built with Genesis Framework + WordPress by Aryan Raj

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