Please add the code in your theme function.php
// Portfolio URL change
add_filter('nimble_portfolio_posttype_slug','handle_nimble_portfolio_posttype_slug');
function handle_nimble_portfolio_posttype_slug(){
return 'project';
}
I just tried this filter in my functions.php and it didn’t work. I even re-saved my permalinks thinking it would refresh it, but it still goes to /portfolio/
This is what I have in:
/*#################### Portfolio URL change ####################*/
add_filter('nimble_portfolio_posttype_slug','handle_nimble_portfolio_posttype_slug');
function handle_nimble_portfolio_posttype_slug(){
return 'video';
}
I’m with Jason — I applied this hack to my functions.php as instructed, but nothing changed.
Disabling the plugin, then re-enabling it caused the filter to take effect.
Now, my portfolio posts have the permalink I want, but the index page still sets the href of each portfolio item to “/portfolio/[slug]” instead of “/what-i-want/[slug]”
I’ve found where the links are rendered in skins/default/items.php
. Now I’m backtracking the function calls to figure out where the “/portfolio” is being coded…
Solved my problem. I had a nimble_portfolio_lightbox_link_atts
filter added to my theme’s functions.php so I could disable the lightbox.
The documentation for removing the lightbox said to use this:
add_filter('nimble_portfolio_lightbox_link_atts', 'handle_nimble_portfolio_lightbox_link_atts', 10, 2);
function handle_nimble_portfolio_lightbox_link_atts($link_atts, $item) {
$link_atts['href'] = get_permalink($item->ID);
unset($link_atts['rel']);
return $link_atts;
}
I changed it to this:
add_filter('nimble_portfolio_lightbox_link_atts', 'handle_nimble_portfolio_lightbox_link_atts', 10, 2);
function handle_nimble_portfolio_lightbox_link_atts($link_atts, $item) {
$link_atts['href'] = '/our-clients/' . $item->post_name;
unset($link_atts['rel']);
return $link_atts;
}
Now, my index page had the correct permalink using the desired slug.