- This topic has 3 replies, 2 voices, and was last updated 6 months, 1 week ago by
Leo.
-
AuthorPosts
-
July 12, 2020 at 7:28 am #1360846
Jennifer
Hello,
I have added my own custom breadcrumbs.
/**breadcrumb short code USED THIS FOR BREADCRUMBS, IT RETURENED THE TITLE OF THE PAGE*/ function post_title_shortcode(){ return get_the_title(); } add_shortcode('post_title','post_title_shortcode');
It works great on all posts except for the posts where I have enabled a page hero. You moved the title from the content page to the page hero section.
https://livinghisword.org/truth-being-unveiled-by-a-virologist-on-covid-19-who-was-there/
<div class="MyBreadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/"><div><a href="https://livinghisword.org/" aria-label="breadcrumb home page">Home</a> / <a href="https://livinghisword.org/daily-biblical-news/" aria-label="breadcrumb daily biblical news home page"> Daily Biblical News</a> / <span aria-current="page">[post_title]</span> </div></div>
For some reason this code is not picking up the post title.
Any ideas on how to fix this?
Here is a page where I am using the same custom breadcrumb and it works great.
https://livinghisword.org/what-life-are-you-exemplifying-light-or-darkness-1-john-15/
<div class="MyBreadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/"><div><a href="https://livinghisword.org/" aria-label="breadcrumb home page">Home</a> / <a href="https://livinghisword.org/bible-teachings/" aria-label="breadcrumb bible teaching home page">Bible Teachings</a> / <span aria-current="page">[post_title]</span> </div></div>
Thank you Jennifer
Jennifer
Living His Word Ministries, Inc.
www.livinghisword.orgJuly 12, 2020 at 10:16 am #1361116Jennifer
Okay I turned off the page header and still having the same problem.
Going to trouble shoot this.
Jennifer
Living His Word Ministries, Inc.
www.livinghisword.orgJuly 12, 2020 at 10:21 am #1361124Jennifer
I am sorry it has been a long week.
I did not check the activate short code box.
This is resolved.
Again, sorry 🙂
Jennifer
Living His Word Ministries, Inc.
www.livinghisword.orgJuly 12, 2020 at 11:49 am #1361193Leo
StaffCustomer SupportHi there,
Glad you’ve figured out.
You can actually use the template tag if you are using the page hero:
https://docs.generatepress.com/article/header-element-template-tags/#post_titleDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.