Community Forums › Forums › Archived Forums › General Discussion › agency – remove "you are here" from breadcrum
- This topic has 4 replies, 3 voices, and was last updated 10 years, 6 months ago by karlhen.
-
AuthorPosts
-
April 25, 2013 at 6:33 am #37621karlhenMemberApril 25, 2013 at 6:55 am #37623Brad DaltonParticipant
Add this code to the end of your child themes functions.php file using a text editor like Notepad++
add_filter( 'genesis_breadcrumb_args', 'child_breadcrumb_args' ); /** * Amend breadcrumb arguments. * * @author Gary Jones * * @param array $args Default breadcrumb arguments * @return array Amended breadcrumb arguments */ function child_breadcrumb_args( $args ) { $args['home'] = 'Home'; $args['sep'] = ' / '; $args['list_sep'] = ', '; // Genesis 1.5 and later $args['prefix'] = '<div class="breadcrumb">'; $args['suffix'] = '</div>'; $args['heirarchial_attachments'] = true; // Genesis 1.5 and later $args['heirarchial_categories'] = true; // Genesis 1.5 and later $args['display'] = true; $args['labels']['prefix'] = 'Remove This Text '; $args['labels']['author'] = 'Archives for '; $args['labels']['category'] = 'Archives for '; // Genesis 1.6 and later $args['labels']['tag'] = 'Archives for '; $args['labels']['date'] = 'Archives for '; $args['labels']['search'] = 'Search for '; $args['labels']['tax'] = 'Archives for '; $args['labels']['post_type'] = 'Archives for '; $args['labels']['404'] = 'Not found: '; // Genesis 1.5 and later return $args; }
Source:http://my.studiopress.com/snippets/breadcrumbs/
May 7, 2013 at 10:43 am #39730karlhenMemberI did as instructed and the code shut down my entire website.
Not sure what to do next.
May 7, 2013 at 1:00 pm #39754essaysnarkParticipantHi karlhen - looks like your site is back up again, so congrats on working through that! There was probably a mistake introduced in the code. The functions.php file is very sensitive to typos and it's easy to make mistakes with this.
One possibility is that the code published here on the forum has formatting. It's important that the snippet you copy gets pasted as plain text; that's why Brad suggested using a text editor. If you're on a PC then you can use Notepad or if you're on the Mac, use TextEdit. Also, before making changes, be sure to have a backup of your functions.php on hand so that you can restore it if you need to, and have access to your server via FTP so that you can upload that backup if it gets screwy.
Here's what to do to clear out any formatting in copied text:
- Copy the snippet above, then paste it into the text editor. This will strip out any other types of formatting.
- Then, select it from the text editor, and paste it into the bottom of your child theme's functions.php file (if it says Genesis: Theme Functions at the top you're in the wrong place! Use the dropdown menu on the right to switch to your Child Theme, then click on functions.php - it should say "[theme name] Child Theme: Theme Functions (functions.php) at the top).
- Also, make sure you don't delete anything that's already in functions.php; just add this code to the bottom.
- Save your file and hopefully it worked this time!
One additional change you'll need to make: If you literally don't want any text at the beginning of your breadcrumbs line, then delete the words
Remove This Text from the snippet above. But leave the single-quote marks, you need those. Just delete the three words themselves. You can delete this after it's been pasted into functions.php.
Hopefully I didn't tell you what you already know with this stuff! Let us know if you have other problems.
September 8, 2013 at 10:40 am #61356karlhenMemberThanks it works.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.