• Resolved Zilla

    (@dawnzillamonster)


    Hi there,

    I wanted to change the portfolio permalink and found these directions:

    That is actually changed in the virtue toolkit plugin.
    Open up the plugin and you will see post-types.php
    Open that file. Find line 27 and delete that line for this:

    'rewrite' => array( 'slug' => 'artists' ), /* you can specify its url slug */

    Save the file.
    In wordpress go to settings > permalinks and click that save changes button at the bottom.

    I have done this, but no luck. The portfolio slug is still ‘portfolio’. Any ideas?

Viewing 14 replies - 1 through 14 (of 14 total)
  • hannah

    (@hannahritner)

    Have you tried clearing your cache? Can you post a link?

    Hannah

    Hey, Those directions are out dated.

    Now you can just use a filter in your child themes functions.php file.
    add_filters('kadence_portfolio_permalink_slug', 'artists');

    Kadence Themes

    Thread Starter Zilla

    (@dawnzillamonster)

    Tried the filter. Got error message:

    Fatal error: Call to undefined function add_filters()

    Sorry, Not thinking.. here is the correct code:

    add_filter( ‘kadence_portfolio_permalink_slug’, function() { return ‘artists’; } );

    Kadence Themes

    After you add be sure to re-save your permalinks in settings > permalinks.

    Kadence Themes

    Thread Starter Zilla

    (@dawnzillamonster)

    That also broke the site:

    Parse error: syntax error, unexpected T_FUNCTION

    Hmm, I test that. Where are you adding?.. your adding right in your child theme functions.php file? Are you copying from here?

    add_filter( 'kadence_portfolio_permalink_slug', function() { return 'artists'; } );

    Kadence Themes

    Thread Starter Zilla

    (@dawnzillamonster)

    Yep, adding in child theme functions.php. Copied exact code. Just did it again and got same parse error.

    Is there anything else in your child themes functions file?

    Kadence Themes

    Thread Starter Zilla

    (@dawnzillamonster)

    Nope, nothing else.

    ok are you starting with <?php at the top for the php doc?

    Try changing to a function like this:

    add_filter( 'kadence_portfolio_permalink_slug', 'custom_portfolio_slug');
    
    function custom_portfolio_slug() {
    	return 'artists';
    }

    Kadence Themes

    Thread Starter Zilla

    (@dawnzillamonster)

    YES! That did it. Thanks so much for all of your help!

    Hello.
    I’m try do this, but not work.
    URL change, but when i try to open link – error 404.

    This case actually is now?

    Thanks!

    hannah

    (@hannahritner)

    letopis,
    Can you please start a new thread and provide a link to your site?
    Thanks!

    Hannah

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Changing portfolio permalink’ is closed to new replies.