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

The Cre8tive Diva - WordPress Developer

Digital Nomad | Helping WordPress & Genesis Framework Website Owners All Over the World

  • Home
  • About
    • Terms of Service & Privacy
    • Accessibility
  • Services
    • Pre-Made Genesis Theme Installation & Customization
    • Same Day Installation Service
    • Blogger to WordPress Migration
    • Buddypress Installation
  • My Work
  • Blog
    • Tutorials
    • Five on Friday
    • Genesis Framework
    • Tipsy Tuesday
    • WordPress
  • Contact
    • Support
  • Shop
  •  

Updated on December 6, 2018

How to Rename the Genesis Portfolio Pro Slug

rename the genesis portfolio pro slug
Photo Credit: Ilya Pavlov, Unsplash.com

This past Monday a member of our Genesis Slack group asked a question, “Has anyone been able to successfully change the slug on Genesis Portfolio Pro plugin?” It was a little late but I was online.

I did some searching and came across two discussions on the web. The following code was “inspired by” this post on  WordPress.org and this one on StackExchange which were the first two that showed up in my search results.

After reviewing the conversations, I fired up a demo. I then combined the suggestions and re-wrote the following which works perfectly.

If you are unfamiliar with working with your theme files, stop and ask for help. If you are familiar with modifying your theme files – you should back them up before proceeding.

Procedure

Just add this to your functions.php file. On line 13, change “your-new-name” to whatever slug you’d like, for example, “showcase”.

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_action( 'init', 'rename_portfolio_custom_post_type_slug', 5 );
/**
* Rename slug in Genesis Portfolio Plugin.
*
* @author Anita Carter
* @link https://cre8tivediva.com/rename-genesis-portfolio-slug
*/
function rename_portfolio_custom_post_type_slug() {
$args = get_post_type_object( 'portfolio' );
$args->rewrite['slug'] = 'your-new-name';
register_post_type( $args->name, $args );
}
view raw functions.php hosted with ❤ by GitHub

That’s it!

Like my Signature? Get the Signature Widget for Genesis right here!

FacebookTweetPinPrintShares28

Filed Under: Genesis Framework, Tutorials Tagged With: genesis portfolio pro

Primary Sidebar

It's just me and my dog Bella. I am a freelance web developer at Cre8tiveDiva.com. I build websites using WordPress and the Genesis Framework, WooCommerce and provide troubleshooting and support. I also build with Shopify. I love chocolate, lots of coffee!

Sign Me Up!

Receive my blog posts, tips and updates delivered to your inbox!

Yes, Sign Me Up

*By signing up you will receive new blogs, updates on products, services and important alerts.

Categories

  • Design
  • eCommerce
  • Five on Friday
  • Fonts
  • Free Themes
  • Freebie Friday
  • Genesis Framework
  • Genesis Plugins
  • Genesis Themes
  • Genesis Untapped
  • Instagram
  • MailChimp
  • News
  • Plugins
  • Press This News
  • Social Media
  • Tipsy Tuesday
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Web Development
  • WooCommerce
  • WordPress
  • WordPress Plugins

Footer

Digital Nomad! I can be anywhere I wanna be now.

  • Facebook
  • Google+
  • RSS
  • Twitter

Latest Blog Posts

  • Temporary Fix When Using Genesis Blocks Posts and Page Grid with Genesis Simple Share
  • How to Add Reading Time to a WordPress Genesis Child Theme Without a Plugin
  • How to Add “Shop” to WooCommerce Breadcrumbs when Using Yoast

Looking for Something?

Copyright © 2012–2021 · Designed with by Me! · Hosted on SiteGround