Blog Posts Formatting
-
HELP! My client doesn’t like the posts formatting.
She wants the full post to appear not just the extract, when you click on the Category or an older/newer post.
She wants a very simple navigation between posts = Previous and Next. Maybe at the top of the post instead of the bottom…
How can I do that on Senses Lite theme? I have created a child theme.
Advice please!
-
You mean your client doesn’t want the intro part with a Read more (or continue reading) ?
If so, go the admin menu group Appearance >> Customize >> then Blog Options
Look for the “Content or Excerpt” setting and make sure the “Content” option is checked. Then, to not have the full post show up and not the intro part on the blog home page, the posts do not have the More Tag inserted in the post (the thing on the editor that splits the post into an intro.
More info on the more tag can be found HERE
Regarding blog navigation, are you referring to the blog home page or if someone is on the full post view by itself?
Yes, that is what she is asking for, Full post view from the get go. “Like on my old site”
Content option is checked and there are no <more> tags in posts.
Getting full post to show instead of excerpt is biggest issue for her, then navigation.
Navigation issue is on full post view. Could even stay with Older and Newer if I can remove the post title/date etc.
Thank you!
Without doing significant recoding of the navigation, the best that can be done for the least amount of work based on what you mentioned, is to hide the nav post title on the full post view. This can be done with some custom CSS:
.post-navigation .post-title { display:none; }
Do I understand correctly that the post date is to be removed as well?
Thank you. What file does this code go in please? I looked in the style.css and index.php pages but I don’t find .post-navigation.
Yes, post date is to be removed as well.
As for my other issue = display content and not extract, what else can I do? As I wrote before, Content is checked in the Customize Blog Options.
Is this a bug with the template? Please advise.
it goes in the style.css file and your another issue idk ??
Because you are using a child theme, in your admin, go to Appearance >> Editor
Then, in the upper right is a dropdown list. Select your child theme you made and then in the list of files in the right column area, click on the one that is named stylesheet. Normally this is the file that has is displayed in the main window there. You would paste that code I gave you below the content that you see in the stylesheet that is displayed.
If you want the post date removed in the full you will need to add this custom CSS as well:
.posted-on { display:none; }
For the blog home page though, there is a setting for turning this off there. Go to Appearance >> Customize >> Blog Options
Look for this “Show Summary Post Date” setting and uncheck the box to hide it.
If you have the “Content” checked in the Blog Options and your post has no More Tag inserted but it still shows the “Continue” link in the front of the site, it looks like there’s a bit of a bug. I noticed this on my test site. But if you go to that setting, click on the Excerpt, then back to the Content, then click SAVE, it seems to work. **I will need to find out why it does that and fix it.
Wow! That did it!! Thank you so much!
Just a couple more things since I have your attention.
1) Is there a way to change the text from “Older Posts” and “Newer Posts” to “Next” and “Previous”. Maybe that’s asking alot?
2) My client also wanted different nav text = bigger font and bold. Could you possibly tell me where in the .css I need to look to change that? Or is it in the header.php file?
Thanks again for your help!
For your #1, normally it would be done with a translation file, but you can do this by copying the parent theme’s function. In your child theme’s function.php file, right below this line:
// Add your own functions below this line
Add this:
if ( ! function_exists( 'senses_lite_post_pagination' ) ) : function senses_lite_post_pagination() { the_post_navigation( array( 'next_text' => '<span class="meta-nav" aria-hidden="true">' . esc_html__( 'Next Article', 'senses-lite' ) . '</span> ' . '<span class="screen-reader-text">' . esc_html__( 'Next Article:', 'senses-lite' ) . '</span> ' . '<span class="post-title">%title</span>', 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . esc_html__( 'Previous Article', 'senses-lite' ) . '</span> ' . '<span class="screen-reader-text">' . esc_html__( 'Previous Article:', 'senses-lite' ) . '</span> ' . '<span class="post-title">%title</span>', ) ); } endif;
Change the Next Article and the Previous Article labels to be what you want. I would also recommend updating the language text domain from senses-lite to the one for your child theme text domain.
For #2, you can change the font and size using this class for the selector…see below for the default theme styling used:
.post-navigation .meta-nav { display: block; text-transform: uppercase; letter-spacing: 2px; font-size: 0.688rem; }
To override the font size and or the font:
.post-navigation .meta-nav { font-family: your font here font-size: your font size here }
Shoot, the navigation still is not working. I’m in another category, viewing a full post and at the bottom it now it says:
PREVIOUS ARTICLE
Previous Article: THE YOGA TREENEXT ARTICLE
Next Article: The City (From Above)How do I get rid of the names of the posts? If I uncheck this Show Full Post Navigation in Blog Options Settings, there is no more nav at all.
Do you have a code to remove the names of the posts from that too?
Did you add this from earlier to your child theme’s stylesheet?
.post-navigation .post-title { display:none; }
Thanks so much for your help!
Yes, I added that and it works for Older and Newer Posts navigation, but not with PREVIOUS ARTICLE/ NEXT ARTICLE once I view the full post.
This is when I actually click on the post and it gives a different navigation at the bottom.
I would like to be able to just click on PREVIOUS ARTICLE/ NEXT ARTICLE as links and not have the name of the post below it.
Is that possible = with the code you sent previously?
Now you’re getting into a lot of customization here. It sounds like you want the default method of WordPRess default themes. This would require stripping the theme’s own code out and replace it with perhaps the default WordPress nav coding.
Example, open the twenty fifteen theme single.php file and you will see this:
// Previous/next post navigation. the_post_navigation( array( 'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'twentyfifteen' ) . '</span> ' . '<span class="screen-reader-text">' . __( 'Next post:', 'twentyfifteen' ) . '</span> ' . '<span class="post-title">%title</span>', 'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'twentyfifteen' ) . '</span> ' . '<span class="screen-reader-text">' . __( 'Previous post:', 'twentyfifteen' ) . '</span> ' . '<span class="post-title">%title</span>', ) );
You would need to add that into the Senses Lite’s single.php file just below this:
// If comments are open or we have at least one comment, load up the comment template. if ( comments_open() || get_comments_number() ) : comments_template(); endif;
But before doing so, you need to copy the single.php file into the child theme.
To disable the theme’s own nav on the full post view, go to Appearance >> Customize >> Blog Options…..and then uncheck “Show Full Post Navigation”
I’m just doing this as a rough customization, without testing it, so most of whatever you are wanting/needing to do, will have to be you. WordPress has so many different kinds of navigation, it can be quite challenging. You may want to also refer to WordPress documentation, such as using this as a starting point:
I will run all this by my client. Thank you so much for your help!
??
No worries… I was about to follow up to find out how things went. Hopefully all will go well ??
- The topic ‘Blog Posts Formatting’ is closed to new replies.