Blog: R6D50: #100DaysOfCode (More Posts)
So having made the advances that I did in my WordPress Starter repository project from yesterday (see the previous post in this blog) Turned my attention to implementing some enhancements to this very blog. It took me the whole day but I ended finishing up getting the monthly archive links sorted and working which was a tricky endeavour even after the functionality was introduced in the WordPress core after 4.4.
It required a lot of determination and trial and error and wondering why it did not work even when I was pulling the “post_type” attribute in WP_query() in just as suddenly… it did.

Took me the whole day but I managed to sort out the blog archives. See below.
Before I got into that I crossed off a few items on my to do list,
Firstly, I swapped out some featured images in my article list to make the list of images on the article page appear consistently. The problem occurred because I used an 800 by 600 image which is the size of screenshot.png images but the size required for this site is 1080, 1080. So that visual inconsistency has been fixed.
list item stying
textarea#comment {
font-family: 'Roboto';
font-weight: bold;
/* letter-spacing: 3px; */
font-size: 12pt;
}
.individual_comment_container {
span {
color: #f3fbae;
}
}
enhancing comments section
I solved a bug in which the archived lists of posts were displaying the current date and time for each comment that is posted to my blog, rather than the date the posts were made. I got this done by simply changing the use of the date() with the the_date() method. There is also the problem of the final comment not showing up but there is a simple enough fix for that too, which I’ve added to my bug list. 🙂
Enhancing the subdomain list.
There were some issues with the way the PHP methods render HTML markup. To make sure that the HTML was being displayed properly in the theme footer, I elected to avoid using WordPress widget attributes wherever possible to do it. I hard the level 2 headings where I want it which was above the widgets rather than below
<ul class="footer-services"> <?php echo "<h3> Subdomain List </h3>"; wp_nav_menu( array( 'theme_location' => 'footer_services_menu'/* , 'container_class' => 'footer-services', 'container' => 'div' */ ) ); ?> </ul>
I mentioned before that I was trying to build up the monthly archives for archived posts on my blog posts custom post type and eventually succeeded. Looking back I’m glad that I have now done this although it’ll take a bit more reverse engineering to understand when exactly this was achieved
Why for example did I have so much trouble getting the the January posts to show up in this blog when I have both the type and the post type attriburs decared to WP_Query and show can I get this to display the post counts for each month?
$date_archive = new WP_Query( array( 'post_type' => 'blog_posts', // 'type' => 'monthly' //'search' => $s, //'posts_per_page' => 30, // This is the amount of posts per page you want to show ) );
Still more work to be done but I count today as progress.


