- This topic has 11 replies, 2 voices, and was last updated 1 year ago by Tom.
April 3, 2020 at 9:24 pm #1225805Robin
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?
from the page:
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.April 4, 2020 at 9:29 am #1226483TomLead DeveloperLead Developer
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?April 4, 2020 at 3:29 pm #1226798Robin
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 youApril 4, 2020 at 5:44 pm #1226843TomLead DeveloperLead Developer
Additional CSS and your Element should be safe.
It would have to be the
attachment.phptemplate, 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.April 4, 2020 at 7:19 pm #1226878Robin
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.April 5, 2020 at 9:18 am #1227527TomLead DeveloperLead 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.April 13, 2020 at 8:44 am #1237511Robin
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.April 13, 2020 at 4:53 pm #1237973TomLead DeveloperLead Developer
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?April 13, 2020 at 5:41 pm #1237994Robin
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?April 14, 2020 at 9:34 am #1238950TomLead DeveloperLead Developer
By default in GeneratePress,
single.phpshould be called when a single attachment is opened.
This can be overwritten by adding a
attachment.phpfile.April 14, 2020 at 10:03 am #1238989Robin
Good to know. Thank you.April 14, 2020 at 4:40 pm #1239304
- You must be logged in to reply to this topic.