Skip to content

Instantly share code, notes, and snippets.

@ahmedeshaan
Created May 14, 2020 05:27
Show Gist options
  • Select an option

  • Save ahmedeshaan/fa77df97987f252b3fe993fa2f275e7e to your computer and use it in GitHub Desktop.

Select an option

Save ahmedeshaan/fa77df97987f252b3fe993fa2f275e7e to your computer and use it in GitHub Desktop.
Flatsome Portfolio was designed in that way. They need to modify the core file if they don't want to use it like that. It's on line #228 of the flatsome/inc/post-types/post-type-ux-portfolio.php file.
The code
return str_replace( '%featured_item_category%', implode( ',', $post_terms ) , $permalink );
Should be changed like this
return str_replace( '%featured_item_category%', $post_terms[0] , $permalink );
Permalinks need to be saved after this. But be aware that this customization will be overwritten by the theme update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment