• Resolved pixelshrink

    (@pixelshrink)


    Hi, I’m trying to change the portfolio-type slug. I came across this code online for the Pinnacle theme but it doesn’t seem to work for the Ascend one:

    function kt_init_filter_portfolio() {
    add_filter(‘kadence_portfolio_type_slug’, ‘kadence_portfolio_type_slug_custom’);
    function kadence_portfolio_type_slug_custom() {
    return ‘portfolio-category’;
    }
    }
    add_action(‘after_setup_theme’, ‘kt_init_filter_portfolio’);

    Is there any way I can get this to work with Ascend?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The toolkit is whats making that so it doesn’t matter if your using pinnacle or ascend that would work.

    Can you make sure there isn’t another plugin adding a second portfolio custom post? For example, jetpack has a custom portfolio post type as well that you can enabled or disable.

    You’re adding this to a child theme correct? Then going to settings > reading and resaving permalinks after you add it?

    I can confirm through testing that this is the correct code:

    function kt_init_filter_portfolio() {
    	add_filter('kadence_portfolio_type_slug', 'kadence_portfolio_type_slug_custom');
    	function kadence_portfolio_type_slug_custom() {
    		return 'portfolio-category';
    	}
    }
    add_action('after_setup_theme', 'kt_init_filter_portfolio');
    Thread Starter pixelshrink

    (@pixelshrink)

    Thanks very much for that. It’s the resaving permalinks that I’d forgotten about. Works great now.

    Great glad to hear it!

    Thread Starter pixelshrink

    (@pixelshrink)

    I’m also wondering if there’s any easy way to show categories and sub-categories in the portfolio type archive URL – e.g. site.com/portfolio-type/category/sub-category/, rather than site.com/portfolio-type/sub-category as it is at the moment.

    I’ll send this onto the theme developer so that he can provide some feedback.

    In the future, please start a new topic for support queries. Thanks!

    -Kevin

    • This reply was modified 8 years, 5 months ago by Kevin.
    Thread Starter pixelshrink

    (@pixelshrink)

    Thanks very much, sorry I should have started a new thread.

    No worries! You’ll typically get quicker responses with a new thread, so usually that’s the best way to get an answer.

    -Kevin

    Hey,
    There isn’t an easy way. You would have to create your own permalink structure. Here is a stackexchange that talks about it: https://wordpress.stackexchange.com/questions/39500/how-to-create-a-permalink-structure-with-custom-taxonomies-and-custom-post-types

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Change portfolio-type URL slug’ is closed to new replies.