Tagged: breadcrumb, child theme, separator
-
AuthorPosts
-
September 1, 2014 at 10:52 am #311728
Hi there.
First thanks for the theme. It is sooo easy to work with it. And sorry for this topic as I found a solution in the past but now I cannot reproduce it.My environment -> enfold theme (2.9.2, I believe) with a child theme that I am customizing.
I just want to change the breadcrumb separator from ‘/’ to any other thing like » or so. Sometime ago I found a very elegant solution but after that I have created the child theme, customize, moved the blog to other installation point and – my fault – the change is lost and the separator went back to the default /.
What’s the simplest way to change just this separator without touching any code in the enfold parent theme folder?
thanks in advance!
September 1, 2014 at 12:23 pm #311753Hey niquelao!
Please go to Enfold/framework/php folder and open class-breadcrumb.php and find following line
$separator = '<span class="sep">' . $separator . '</span>';
and change it to
$separator = '<span class="sep"> - </span>';
Then you can move the file to your child theme.
Cheers!
YigitSeptember 1, 2014 at 2:24 pm #311824Hi Yigit!
thanks a bunch.I cannot manage to make it working after some tests.
If I move the file, I got an error (indicating that the file must exist) and if I copy, nothing happens.So the questions.
1) when you say “move”, you mean “move”? If so, when I will update the theme, does it create the file again and stop working?
2) where in the child theme? I have tried both the child theme root dir and creating framework/php/ folder in it.
3) what about the functions in that ffile that are not include in a if(!function_exists(‘…’)) clause?thanks again!
September 2, 2014 at 11:30 am #312195Hey!
Copy the original file Enfold/framework/php/class-breadcrumb.php into the root directory of enfold-child (same, where enfold-child/functions.php is).
Modify this file as described above.
In enfold-child/functions.php put the following at the end:
require_once( 'class-breadcrumb.php' );
Delete the original file. You have to delete the original file after every update of the theme.
Regards,
GünterSeptember 2, 2014 at 4:18 pm #312366Now I understand how it works!
thank you, cheers
efraim -
AuthorPosts
- The topic ‘Change breadcrumb separator’ is closed to new replies.