• So I found the rewrite solution for custom post types, however I want to edit the PHP file on my child theme.

    I copied the file and made sure it was in the right folder as the parent folder, but no luck! It did work if I edited it directly off the parent file.. but thats not what I want.

    Here is the rewrite I was using.

    'rewrite' => array('slug' => '/')

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Custom post types should be registered from a hook to ‘init’. Such code should be in functions.php of your child theme. When creating a child theme, you do not copy the parent functions.php, you create a new empty one, then add your code into it. WP will take care of loading the parent theme code without you needing to do anything beyond correctly formatting style.css.

Viewing 1 replies (of 1 total)
  • The topic ‘Rewrite Slug for custom post types & Child themes.’ is closed to new replies.