Pages redirected to attachment post

THE SETUP

I’m using WordPress 3.4.2 with Magic Fields 2 plugin. Using MagicFields2, I’ve added a custom field to the builtin ‘page’ post type. This field is called ‘section_header’ (which is basically just an attachment post type). My permalink structure is /%category%/%postname%/.

THE PROBLEM

Sometimes, when I try to view a page with a ‘section_header’ set, I get redirected to a post for the attachment instead of the post that I’m trying to view. I’ve noticed that the page and the attachment have the same title when this happens. It seems that the attachment is somehow getting a permalink that is superceding the permalink of the page.

Read More

A WORKAROUND

I can make the page display if I can the permalink of the page. Changing the title of the attachment in the Media Library does NOT seem to change the permalink of the attachment.

AN IDEAL SOLUTION

My ideal solution would let me change the permalink of the attachment instead. How can I accomplish this? Thanks!

Related posts

Leave a Reply