Tagged: breadcrumbs, Shortcodes
-
AuthorPosts
-
August 12, 2017 at 5:55 am #837728
I’ve been reading this tutorial on using the Breadcrumbs as a Shortcode (which I’d like to do).
However, I’m using a Child Theme.
I’ve copied the‘//advanced title + breadcrumb function’
function from thefunctions-enfold.php
file.
But the idea of making edits to theEnfold/template-builder.php
seems crazy.Since the tutorial is from 2015 I’m wondering: is there a newer, and better way to use breadcrumbs in a shortcode?
Preferably one that doesn’t require making edits to Enfold Theme files.Thank you!
Chris
August 12, 2017 at 2:13 pm #837881Hey Chris,
Well, you can use a child theme, copy the template-builder.php and makes edits there.
Best regards,
VictoriaAugust 12, 2017 at 8:25 pm #838003Hi Victoria,
1. Do you mean “copy the entire template-builder.php into my Child Theme functions.php”? Or something else?
2. If Kriesi updates the template-builder.php in future versions of Enfold, won’t doing this cause problems?Thank you for your help.
Chris
August 14, 2017 at 12:24 pm #838598Hi Chris,
You need to copy the file preserving the folder structure.
You need to be aware of the changes you made any way, make some comments in the file.
This file does not change that often.
There are two ways to go here.
1) Keep the file in the parent theme and put your changes every time there is a theme update.
2) Put the file in the child theme, make changes there, mark them for yourself. Every time there is an update, just check if the file changed in the parent theme. If yes, merge the files, if no – all is well :)
It’s up to you, whichever is better for you.If you need further assistance please let us know.
Best regards,
VictoriaAugust 19, 2017 at 1:57 am #841103Thanks for that Victoria.
Every time there is an update, just check
For me, one of the main benefits of using a Child Theme is that I can develop and not have to worry about updates to the core theme files.
If I have to remember to compare and (potentially) edit files every time there is an update to the core theme – I can’t use either method.
It just adds too much work to the maintenance of the site (esp. when I’ve got many sites to maintain).For now I’ve solved it by using the Yoast SEO breadcrumbs instead of Enfold.
I just put the Yoast breadcrumbs shortcode into a textblock and it works fine.Again – I appreciate your help Victoria.
ThanksChris
August 22, 2017 at 9:02 pm #842764Hi,
Yoast breadcrumbs is a solution yes and actually a really more fresh as it also works good with Yoast and the results are great for SEO.
Please do feel free to let us know if there is anything else we can do for your and we will be more than happy to help.Thank you
Best regards,
Basilis -
AuthorPosts
- The topic ‘Adding Breadcrumbs as shortcode: Is there a better way than editing theme files?’ is closed to new replies.