I am experiencing some odd behavior, that apparently happens "out of the box" with WordPress.
If I upload a file through the media manager called: services.jpg;
then go try to create a page with the permalink http://example.com/services/;
The slug services-2
is given instead, because the attachment is already using that slug.
Visiting http://example.com/services/
loads the attachment page.
I have not enabled any plugins or added anything into functions.php to modify the rewrites for attachments.
Has anyone run into this before? Know where to start to disable this functionality?
attachment
, as are pages which are of typepage
). This is to prevent clashes. There are some bits of code that might help, but I'm unfamiliar with the specifics. Also, this is something that will eventually be fixed in Core, or at least have some sort of solution, Eitherway the problem is ambiguity, what if you have a post typeservices
a page calledservices
and a normal post, and you set your permalinks to only have the name?