Various issues with Balance theme

Community Forums Forums Design Tips and Tricks Various issues with Balance theme

This topic is: not resolved

Tagged: 

This topic contains 10 replies, has 3 voices, and was last updated by  webmonkey 7 months, 1 week ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #92891

    webmonkey
    Participant
    Post count: 43

    It’s happened a few times with StudioPress themes, that there’s apparent collisions going on between home.php, the Genesis Theme Settings etc.

    For whatever reason, I can’t see “Continue Reading” appearing in Balance anywhere after the Excerpts. There appears to be a reference to it in functions.php, but it doesn’t show up on the site.

    Changing the number of posts per page in both the theme functions and homepage makes no difference. I want 4, it says 4 everywhere, I get 5. Here’s the code:

    functions.php reference:

    /** Customize 'Read More' text */
    add_filter( 'get_the_content_more_link', 'balance_read_more_link' );
    add_filter( 'the_content_more_link', 'balance_read_more_link' );
    function balance_read_more_link() {
    	return '<a class="more-link" href="' . get_permalink() . '" rel="nofollow">' . __( 'Continue Reading' ) . '</a>';
    } 

    home.php reference:

    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'child_grid_loop_helper' );
    /** Add support for Genesis Grid Loop **/
    function child_grid_loop_helper() {
    
    	if ( function_exists( 'genesis_grid_loop' ) ) {
    	
    		genesis_grid_loop( array(
    			'features' => 0,
    			'feature_image_size' => 0,
    			'feature_image_class' => 'align none post-image',
    			'feature_content_limit' => 0,
    			'grid_image_size' => 'grid',
    			'grid_image_class' => 'align none post-image',
    			'grid_content_limit' => 0,
    			'more' => __( 'Continue reading...', 'genesis' ),
    			'posts_per_page' => 4,
    		) );
    
    	}
    
    	else {
    		genesis_standard_loop();
    	}
    
    }
    
    genesis();
    #92913

    braddalton
    Participant
    Post count: 10225

    You will need to choose the content limit rather than excerpts under Content Archives in the Genesis > Theme Settings.


    #93425

    webmonkey
    Participant
    Post count: 43

    Balance respects WordPress Excerpts. I won’t use the More tag as that ends up in misery if you start articles with an image. It’s a horrible feature. Is there a way to add Continue Reading text to Excerpts?

    I am trying to reduce the number of articles visible on the homepage from 5 to 4. That wasn’t addressed in this response.

    Are you with StudioPress? They don’t seem to monitor these forums at all.

    • This reply was modified 7 months, 3 weeks ago by  webmonkey.
    • This reply was modified 7 months, 3 weeks ago by  webmonkey.
    • This reply was modified 7 months, 3 weeks ago by  webmonkey.
    • This reply was modified 7 months, 3 weeks ago by  webmonkey.
    #93458

    AC
    Blocked
    Post count: 7712

    The forum is run by volunteers. This is not official support so no they don’t monitor the forum often. Please provide a link to your website so we can take a look. Thank you.

    #93557

    webmonkey
    Participant
    Post count: 43

    Thanks.

    Here’s the staging site:

    http://turbo20.qnop.net/~changing/

    There are 5 articles on homepage, I just want 4.

    At the end of Excerpts, I want a “Continue Reading” link.

    #93565

    AC
    Blocked
    Post count: 7712

    Open up the home.php file and look for this:

    	if ( function_exists( 'genesis_grid_loop' ) ) {
    	
    		genesis_grid_loop( array(
    			'features' => 1,
    			'feature_image_size' => 0,
    			'feature_image_class' => 'align none post-image',
    			'feature_content_limit' => 0,
    			'grid_image_size' => 'grid',
    			'grid_image_class' => 'align none post-image',
    			'grid_content_limit' => 0,
    			'more' => __( 'Continue reading...', 'genesis' ),
    			'posts_per_page' => 5,
    		) );

    You can change both in that code and save it.

    #93566

    AC
    Blocked
    Post count: 7712

    Excerpts don’t have “Continue Reading” – but where it says “content limit” you can change 0 to say 250 and it will show up for you.

    #93568

    webmonkey
    Participant
    Post count: 43

    That code you suggested I look at is the code I posted originally. Changing it to 4 from 5 made no difference. This is how this post began.

    I get that Excerpts don’t have “Continue Reading”. I don’t want to do the content limit thing, preferring the control of Excerpts. I just need a link/image link at the end of Excerpts. That’s got to be doable.

    #93569

    AC
    Blocked
    Post count: 7712

    Sorry, for some reason I am not getting notified of others who are commenting on here. I am just clicking the latest permalink in the email to respond here. The only other solution I can offer for the number of posts is to go to Genesis > Settings, scroll down to Archive Settings and check that. If that is set up correctly, then go to Settings > Reading and change that number in there.

    • This reply was modified 7 months, 3 weeks ago by  AC.
    • This reply was modified 7 months, 3 weeks ago by  AC.
    #93592

    webmonkey
    Participant
    Post count: 43

    Yes, thank you. Changing the Readings settings worked. Not sure why a custom home page wouldn’t override that though. :-(

    I found this code for adding a Read More link to Excerpts, but it’s not functioning sadly:

    add_filter( 'excerpt_more', 'child_read_more_link' );
    add_filter( 'get_the_content_more_link', 'child_read_more_link' );
    add_filter( 'the_content_more_link', 'child_read_more_link' );
    /**
     * Custom Read More link.
     *
     * @author Greg Rickaby
     * @since 1.0.0
     */
    function child_read_more_link() {
    	return '<a class="more-link" href="' . get_permalink() . '" rel="nofollow">Continue Reading...</a>';
    }

    There has to be a way to hook a permalink at the end of the Excerpt.

    #95054

    webmonkey
    Participant
    Post count: 43

    Here’s the solution for the adding a more link to manual Excerpts:

    http://www.studiograsshopper.ch/code-snippets/customising-the_excerpt/

    Thanks folks.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.