- This topic has 5 replies, 2 voices, and was last updated 1 year, 6 months ago by
Tom.
-
AuthorPosts
-
August 28, 2019 at 10:11 pm #995967
Alexander
Hello,
while trying to figure out a way to show the parent for my photos (see https://generatepress.com/forums/topic/template-for-attachments-image/) I found and added Breadcrumbs via Yoast SEO, via Elements / Hooks, and using “Media” (among others) as the Display option.
Unfortunately, the breadcrumbs don’t show for photos that are attached to a PAGE – only for photos that are attached to a POST (at least as far as I can tell).
Examples:
https://www.alex-kunz.com/domelands-late-in-may/mud-hill-bowl/#main (attached to a post, breadcrumbs show)
https://www.alex-kunz.com/photos/summer-dawn-at-garnet-peak/#main (attached to a page, no breadcrumbs)
Looking at the source for the photo attached to the PAGE, it appears that the breadcrumbs item list is there – it’s just not showing.
What am I missing?
Thanks
Alexander.August 29, 2019 at 10:21 am #996543Tom
Lead DeveloperLead DeveloperHi there,
Which Hook are you using to insert the breadcrumbs?
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 29, 2019 at 10:28 am #996551Alexander
The hook I’m using is
before_entry_title
.August 29, 2019 at 7:52 pm #996826Tom
Lead DeveloperLead DeveloperThat hook isn’t available on pages, as it’s meant for single posts.
Instead, you’ll want to create another hook and apply it to the
before_content
hook, and apply it to Pages.It would be good to be able to add multiple hooks to one element – I’ll see what I can do about that π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 29, 2019 at 9:10 pm #996852Alexander
Okay done (and fine tuned – with my existing hook on
before_entry_title
and the new hook onbefore_content
the breadcrumbs would show up twice for media so I adjusted that).Now I have two Hook-Elements, one for Posts & Portfolio items on
before_entry_title
and one for Pages & Media onbefore_content
. Confusing that the hook works or doesn’t work on media depending on the media attachment’s parent. πAnyway – I’ve got nice breadcrumbs showing where I want them now. Thank you!!
August 30, 2019 at 8:55 am #997325Tom
Lead DeveloperLead DeveloperNo problem! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.