I use norebo theme

I use it when I open a Portfolio the link is in this format


How can I remove the word project

To be the link in this format


is project a custom post type? if so, it's been answered here Custom Post Type URL Rewriting?

but, if that is a regular post, it would be in the Settings > Permalinks to set the permalinks.

  • "rewrite" => array( "slug" => "project", "with_front" => true ), "rewrite" => array( "slug" => "/", "with_front" => true ),
    – amer sayed
    Nov 28 '20 at 13:02
  • yes, make it 'rewrite' => array('slug' => 'projects','with_front' => false),
    – Tiyo
    Nov 29 '20 at 0:03

use the str_replace.

$a = 'https://www.hshnorm.com/project/fruit-flavored-powder-juice/';
$b = str_replace( 'project/', "", $a );
echo $b;
  • 1
    I'd guess it's not that simple: I assume the problem is configuring WordPress so that get_permalink() doesn't generate the /project/ in the first place - or whichever prefix - and so that it accepts routes without it correctly too.
    – Rup
    Nov 28 '20 at 7:32
  • it's very possible, in that case the code generated is on a folder call project inside the active theme, maybe retriving it from that folder has the effect desired. But it would be better if it could be done on the dashboard, I dont know how.. Nov 28 '20 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.