Community Forums › Forums › Archived Forums › Design Tips and Tricks › Various issues with Balance theme
Tagged: balance theme
- This topic has 10 replies, 3 voices, and was last updated 10 years, 1 month ago by webmonkey.
-
AuthorPosts
-
February 28, 2014 at 5:46 pm #92891webmonkeyMember
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();
March 1, 2014 at 1:54 am #92913Brad DaltonParticipantYou will need to choose the content limit rather than excerpts under Content Archives in the Genesis > Theme Settings.
March 4, 2014 at 3:57 pm #93425webmonkeyMemberBalance 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.
March 4, 2014 at 8:15 pm #93458AnitaKeymasterThe 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.
Love coffee, chocolate and my Bella!
March 5, 2014 at 12:59 pm #93557webmonkeyMemberThanks.
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.
March 5, 2014 at 1:20 pm #93565AnitaKeymasterOpen 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.
Love coffee, chocolate and my Bella!
March 5, 2014 at 1:21 pm #93566AnitaKeymasterExcerpts 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.
Love coffee, chocolate and my Bella!
March 5, 2014 at 1:26 pm #93568webmonkeyMemberThat 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.
March 5, 2014 at 1:29 pm #93569AnitaKeymasterSorry, 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.
Love coffee, chocolate and my Bella!
March 5, 2014 at 3:44 pm #93592webmonkeyMemberYes, 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.
March 15, 2014 at 12:30 pm #95054webmonkeyMemberHere's the solution for the adding a more link to manual Excerpts:
http://www.studiograsshopper.ch/code-snippets/customising-the_excerpt/Thanks folks.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.