Home Forums Weaver Xtreme Theme How to over-ride weaverx theme defaults so it will use my attachment.php page

Topic Resolution: Answered

This topic contains 2 replies, has 2 voices, and was last updated by  JayDub 3 weeks, 4 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #57381


    I am trying to customize the default page that displays images (when they are attached to a page using the Display Settings Link To set to “Attachment Page”)

    I thought that if I create an attachment.php file for my theme that the WordPress hierarchy will automagically look for it and use it.  But that does not seem to be the case.

    What seems to be happening, is that the attachment file name (the one displayed in the WordPress GUI for adding an image to a page) does try to display, but then is hijacked by going to a link directly to the image.  (For example, my attachment page is https://mysite.com/pagename/imagename1/, but if I paste that into my browser, it changes to https://mysite.com/wp-content/uploads/imagename1.jpg right away)

    How do I get WeaverX to use my attachment.php page?




    I assume you are creating a child theme?

    The attachment template file is called image.php, not attachment.php.

    Best Answer


    This reply has been accepted as the best answer.

    Arggh.  You are too quick on the reply –  was just going to delete this, as I am very stupid.

    I did not realize that Yoast SEO has a setting that over-rides the default wordpress behavior (It has a “Redirect attachment URLs to the attachment itself” setting that is checked by default.)

    I apologize.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.