While making this site have better functionality to see more posts and scroll I built in the ability to scroll through the archives to new and older posts which isn’t included in Carbonate by default.
These instructions will help you add this to your home index page in Carbonate to allow scrolling through more than the original 9 or 12 posts.
You will need to find and remove the code below to strip away the limit of 12 posts that are returned by the search and allow the function of next posts to work as intended:
<?php $args = array('posts_per_page' => 12, 'post_type' => 'post', 'post_status' => 'publish'); ?>
<?php $posts = get_posts($args); ?>
Once this is deleted you will need to find the area of the index.php as you will need to add code after this line:
<?php } ?>
After this line you need to add the code below which will add two clickable buttons with “See More Posts” and “See Previous Posts”.
<div class="container py-5 prev-next">
<div class="white-bg btn border next-left"><?php next_posts_link( 'See More Posts' ); ?></div><div class="white-bg btn border next-right"><?php previous_posts_link( 'See Previous Posts' ); ?>
</div>
</div>
What this does is basically build two buttons (the class btn) that call the next posts or previous posts.
You can change their colors by altering the white-bg to whichever background colors you have built or the standards in styles.css.
I added the following CSS for this site and it can be a starting point for you to begin customizing your implementation:
.prev-next {
text-align: center;
max-width: 75%;
}
.next-right {
float: left;
}
.next-left {
float: right;
}
In this tutorial we will go about adding a fully functional sidebar to Carbonate that includes enabling a Widget area for adding plugins.
Yoast has lately had numerous issues lately with de-ranking content because of changes they made within their plugin, RankMath is new and exciting for SEO.
When you use Carbonate you have a very basic streamlined theme built for providing access to a few categories but no tags, today I changed that for PBI!
Use this code to add a very easy and functional disclaimer of affiliation to your posts making sure to keep you safe from Amazon TOS violations and FTC fines.
Today we are looking at how to change the date field from a static date to a more human friendly relative time (eg 6 months)