Forums

Custom post types and slug with custom post page (1 post)

  1. kayintveen
    Member
    Posted 5 months ago #

    Hi all,

    I am currently working on a new portfolio.
    Current situation.
    I have a static page as frontpage and a /blog page for the blog posts.

    Now i am making a custom post type called "portfolio"
    Works fine untill now, when i click on a portfolio item it goes to:

    /blog/portfolio/item-name/
    but it should be
    /portfolio/item-name/

    I fixed this with doing the following in functions.php:
    'rewrite' => array('slug' => 'portfolio','with_front' => false),

    now it goed to
    /portfolio/item-name/ but i get a 404 error.

    I also flushed the rewrite as stated in many questions.

Reply

You must log in to post.

About this Topic