• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Modifying breadcrumb names on Author Pro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Modifying breadcrumb names on Author Pro

This topic is: not resolved

Tagged: Author Pro, breadcrumbs, library

  • This topic has 9 replies, 3 voices, and was last updated 7 years, 2 months ago by carasmo.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • October 28, 2015 at 10:06 am #169362
    ratsnacks
    Member

    Hi

    I mailed support who suggested putting this out here:

    On http://andrewgmarshall.com/books/ how to Remove "Archives for Library" and display "Bookstore" instead?

    I was given http://wpsites.net/web-design/change-breadcrumbs-in-genesis/ which gets close but not precisely what I want, and the plugin by Nick looks abandoned so I don't want to install it.

    Thanks

    http://andrewgmarshall.com/books/
    November 3, 2015 at 10:32 am #170004
    ratsnacks
    Member

    Bump 🙂

    November 11, 2015 at 12:47 pm #170786
    ratsnacks
    Member

    Last hopeful bump

    November 11, 2015 at 1:23 pm #170789
    Porter
    Participant

    I really have no idea how to change it, even with a css hack-job. There's no selector for that piece of text, it's just on the page, no span, no class, not even just a p tag, nothing.

    What are you using to generate those breadcrumbs? I would install Yoast SEO (almost a must-have for any site anyway), and use those breadcrumbs. From there, I might be able to write some css that can change it specifically for that archive.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    November 12, 2015 at 5:55 am #170840
    ratsnacks
    Member

    Hi Porter

    Thanks - this was helpful. I was simply using the default Author Pro theme breadcrumbs, but had Yoast installed so activated the Yoast breadcrumbs.

    This meant I could remove the "Archives for" part with ease.

    The remaining task is changing the reference to "Library" in all the breadcrumbs to "Bookstore". I am guessing this is buried somewhere deep in the theme code?

    A final thing is that Yoast pumps out the full post title e.g. http://andrewgmarshall.com/book/i-cant-get-over-my-partners-affair-50-questions-about-recovering-from-extreme-betrayal-and-the-long-term-impact-of-infidelity/. Without editing the post title itself, is there a way to show shortened versions (like in the main nav menu dropdown links)?

    Thanks!

    November 12, 2015 at 9:35 am #170859
    carasmo
    Participant

    It's not buried in the theme code, it's part of WordPress itself. If your slug is Library then it will display as Library. Change the words with jQuery put it after the doc ready but before the closing in your particular theme's main.js or global.js file.

       $('.breadcrumb').each(function() {
           var text = $(this).text();
            $(this).text(text.replace('You are here:', '')); //Replaces 'You are here:' with nothing
            var textNext = $(this).text();
            $(this).text(textNext.replace('Library', 'Bookstore')); //Replaces instances of Library with Bookstore
        });

    Genesis Theme Customization and Help

    November 12, 2015 at 9:44 am #170861
    ratsnacks
    Member

    Hi

    Thanks, again very helpful. Before I try this can I clarify - where you typed:

    "Change the words with jQuery put it after the doc ready but before the closing"

    Should that instructions have some semi-colons or brackets?

    Thanks!

    November 12, 2015 at 9:57 am #170863
    carasmo
    Participant

    No that is the code to insert. See below for an example using your global.js file and where to insert.

    After you make changes to css or js, clear your cache.

    jQuery(function( $ ){
    	
    	// Add opacity class to site header
    	if( $( document ).scrollTop() > 0 ){
    		$( '.site-header' ).addClass( 'shrink' );
    		$( '.nav-secondary' ).addClass( 'shrink' );			
    	}
    	
    	$( document ).on('scroll', function(){
    
    		if ( $( document ).scrollTop() > 0 ){
    			$( '.site-header' ).addClass( 'shrink' );
    			$( '.nav-secondary' ).addClass( 'shrink' );			
    
    		} else {
    			$( '.site-header' ).removeClass( 'shrink' );
    			$( '.nav-secondary' ).removeClass( 'shrink' );			
    		}
    
    	});
    	
    	// Add class for tertiary menu
    	$(window).scroll(function() {
    	       var distanceFromTop = $(document).scrollTop();
    	       if (distanceFromTop >= $( '.front-page-1' ).height() + 40 )
    	       {
    	           $( '.nav-secondary' ).addClass( 'fixed' );
    	       }
    	       else
    	       {
    	           $( '.nav-secondary' ).removeClass( 'fixed' );
    	       }
    	   });
    
    	$( '.nav-primary .genesis-nav-menu, .nav-secondary .genesis-nav-menu' ).addClass( 'responsive-menu' ).before( '<div class="responsive-menu-icon"></div>' );
    
    	$( '.responsive-menu-icon' ).click(function(){
    		$(this).next( '.nav-primary .genesis-nav-menu,  .nav-secondary .genesis-nav-menu' ).slideToggle();
    	});
    
    	$( window ).resize(function(){
    		if ( window.innerWidth > 800 ) {
    			$( '.nav-primary .genesis-nav-menu,  .nav-secondary .genesis-nav-menu, nav .sub-menu' ).removeAttr( 'style' );
    			$( '.responsive-menu > .menu-item' ).removeClass( 'menu-open' );
    		}
    	});
    
    	$( '.responsive-menu > .menu-item' ).click(function(event){
    		if ( event.target !== this )
    		return;
    			$(this).find( '.sub-menu:first' ).slideToggle(function() {
    			$(this).parent().toggleClass( 'menu-open' );
    		});
    	});
    	
       /*---------- text replace -------------*/
         $('.breadcrumb').each(function() {
            var text = $(this).text();
             $(this).text(text.replace('You are here:', '')); //Replaces 'You are here:' with nothing
            var textNext = $(this).text();
             $(this).text(textNext.replace('Library', 'Bookstore')); //Replaces instances of Library with Bookstore
         }); // end text replace
    	
    	
    }); // the end of your ready function

    Genesis Theme Customization and Help

    November 12, 2015 at 10:00 am #170866
    ratsnacks
    Member

    Excellent, that is great, I will try. Thanks for your time!

    November 12, 2015 at 10:00 am #170867
    carasmo
    Participant

    If you view code instructions via email then you may get unwanted characters that will mess up your site. Use the pre code in the box in the post itself.


    Genesis Theme Customization and Help

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble