[Resolved] image-attachment customized page

Home Forums Support [Resolved] image-attachment customized page

Home Forums Support image-attachment customized page

  • This topic has 11 replies, 2 voices, and was last updated 4 years ago by Tom.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1225805
    Robin

    Hello again!

    I did not go to a child theme but I have (with your excellent support) customized the attachment page (the page displayed when the link in a thumbnail in a gallery is clicked).

    Now I think it is best I do go to a child theme, and have set one up, but at this point I am unsure how I did customize that attachment page, and viewing source hasn’t yet enlightened me.

    Any chance you can look at the underlying code and know?

    For example:
    https://janestarks.com/02-16-19-taos-mesa-sunset-3/

    from the page:
    https://janestarks.com/jane-starks-cloudscapes-01/

    I was too timid to activate the child theme at the time, and now… well… apologies: I could use some help.

    Thank you very much.

    #1226483
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It’s hard to tell by looking at the page, unfortunately.

    What did you customize on the page, exactly? How did you add your customizations?

    #1226798
    Robin

    Some of the customization is via the customize>additional css and via an “attachment page” element.

    But I am pretty sure I am also using a *.php file– just can’t remember which one so I don’t know how to best implement the child theme.

    If I give you access to my dashboard, would you be able to determine that?

    . . .

    Thank you

    #1226843
    Tom
    Lead Developer
    Lead Developer

    Additional CSS and your Element should be safe.

    It would have to be the attachment.php template, I think. You can always activate the child theme and see what changes – that way it might give us some hints as to what else needs bringing over. You can always re-activate the parent theme.

    #1226878
    Robin

    That’s what I thought it had to be too, but there is no attachment.php file in the theme folder. There is, however, an attachment.php file in the child theme– not activated.

    #1227527
    Tom
    Lead Developer
    Lead Developer

    You may want to re-name that in the child theme so it doesn’t apply when you activate it. I assume you’re not using a special template right now unless you’ve made changes to the core theme.

    #1237511
    Robin

    I thought I was using a template that support gave me and that I customized, but having gone to child and seen that the attachment page was completely not okay, and gone back, I am still at a loss as to how I customized that attachment page– css certainly, but what else?

    Any chance you can help me sort this out? I just want to know what php file is being accessed CURRENTLY when I click on the two-links link from any gallery page.

    Your assistance most appreciated!

    I view source, I inspect elements, and I haven’t yet figured this out.

    #1237973
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This is pretty impossible for me to tell, unfortunately. The templates being used aren’t visible from the front-end.

    You can compare your files to the core theme files found here: https://github.com/tomusborne/generatepress

    Perhaps that will help?

    #1237994
    Robin

    I did the change by hand: reduced child theme to only style.css and proceeded one change at a time from there.

    So there is no way to tell which *.php file is called when an image attachment link is clicked?? Really?

    #1238950
    Tom
    Lead Developer
    Lead Developer

    By default in GeneratePress, single.php should be called when a single attachment is opened.

    This can be overwritten by adding a attachment.php file.

    #1238989
    Robin

    Good to know. Thank you.

    #1239304
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.