WordPress.org

Support

Support » Themes and Templates » [Theme: Elbee Elgee] attachment page?

[Theme: Elbee Elgee] attachment page?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author Doug
    Member

    @zamoose

    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?

    peterdhaens
    Member

    @peterdhaens

    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)); ?>

    Theme Author Doug
    Member

    @zamoose

    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.

    peterdhaens
    Member

    @peterdhaens

    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

    Theme Author Doug
    Member

    @zamoose

    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?

    peterdhaens
    Member

    @peterdhaens

    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?

    Theme Author Doug
    Member

    @zamoose

    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.

    peterdhaens
    Member

    @peterdhaens

    No i just tryd it
    its not working

    can i change someting on it that it is back working

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Theme: Elbee Elgee] attachment page?’ is closed to new replies.