D
D
dadster2015-11-30 13:23:06
WordPress
dadster, 2015-11-30 13:23:06

How to change slug of custom post type?

There is a custom type, for example apples, there is a single-apple.php template for it. I want /apple/ to be slug /banana/ in the URL. I change it like this - 'rewrite' => array( 'slug' => 'banana') . The URL changes successfully, but the single-apple.php template stops connecting. If I create single-banana.php template, it doesn't work either. Pulls standard single.php. Prompt, please, in what direction here to dig. Need to create a new custom post type? Or is it possible to change the slug of this so that the template also works? Thank you WordPress geniuses!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andrei_odessa, 2016-05-22
@andrei_odessa

Добрый день вы решили данную проблему?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question