I don’t supply an attachment.php
page with Elbee Elgee, thus it falls back to the template hierarchy to determine which page to use. It falls back to single.php
in this case.
What sort of question do you have about it?
i have a lot of visiters the come on my attachment page in the website
and iwant that if the comme from that link that the go to the mainpost
to do this i have to place this in to the attachment page
<?php wp_redirect(get_permalink($post->post_parent)); ?>
If you’re using a child theme (you should be!), just create an attachment.php
with that code in it and WordPress will parse it correctly.
thanks for the fast reply but
its not working
it is this page
(deleted)
if you comme with this link you have to redericted to the main post
(deleted)
dont look to the site this is a test one
this is the thing that i want to do
http://wordpress.org/support/topic/redirect-attachment-page-to-post-page-how-to?replies=14
Peter:
That’s a direct link to a file. There’s nothing I or WordPress can do to natively catch that. Your webserver (IIS, Apache or NGINX) would have to know to catch requests for attachments and then figure out how to route them, which is well outside the scope of a theme’s capabilities.
You’ll need to change the way you’re embedding images in your posts — when you upload an image, choose “Attachment Post URL” under “Link URL” when you insert into post.
Make sense?
yeah on my test site it is differend
sorry
but it works now thanks for the support
ps did you find the problem with the italic font?
Ahh. I think I see what’s going on. The editor stylesheet isn’t styling em’s, I think. However, if you save the post, you’ll see the proper styling on the front end.
No i just tryd it
its not working
can i change someting on it that it is back working