I know it has been a long time since i’ve updated my English blog. I will start with something geeky.
I noticed recently some of the image links have been broken on my site. I’m not too sure whether it is because picasa/google photo change or WordPress upgrades that have been auto performed on these blogs(the latter seemed more likely).
I finally had time to fix some of these for Mom’s blog.. While getting her old photos to me to fix her site, Mom asked me if i could also change her archive pages to list all the blog title with links instead of paginated pages with a few full blog content on each. That should be easy i thought, clearly remember the same functionality i saw on blogger.com. Where user can click on a month on the sidebar and a list of blog title will expand under that month.
I went to the WordPress admin page looking for a setting checkbox to check. To my surprise, there is no such function. I started googling and realized that wordpress users have been asking/begging for such a feature since 9 or 10 years ago but there is still no official support!
Eventually i found a few ways that can be used to do what i want. Documenting them here in case someone else is looking for such a feature.
After getting a full archive page for Mom, i liked it so much, i updated both of my English and Chinese blog’s archives page as well.
1. a full archive page for Mom: Create a custom page template for Archive Index.
1.1 First the page template must has the following in its file. I think the most important is the “Template Name: ” line. It will be consumed by the WordPress Page creation UI, and it will use your mypagetemplate.php as a drop down that you can choose when creating a new page.
[php open tag]
* Template Name: Full Width Page
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
1.2 in the page template use wp_get_archives() with a filter to include dates along side the post title. per this discussion thread. wp_get_archives(‘type=postbypost’) function will give you a list of all your post title, but my mom wants a date next to each title, thus the filter.
2. My own Category Archive Page. Adjust category.php and make use Smart Archives Reload plug-in function to display a list of post title for one category. Per this discussion thread. except i didn’t add a content-archive.page and remove the content of the post and keep the title since i don’t like the pagination that method inherits. the function call i made to smart archives repload is
smart_archives( ”, ‘category_name=’.$category_name );
3.I also added an “All Archive” page for my own blog. But instead of using wp_get_archives(), i used Smart Archives Repload plugin again, but this time used its “format=both” arg since my blog has been around longer than mom’s. A giant list might seem too unstructured. So i make use the year and month block format. It also shows which month i didn’t blog (that’s how i realized i haven’t blogged that long here!)
The function call i used in the page template here is:
4. I’ve also created Child Theme to do all three above, it is surprisingly painless. and also ensures they won’t get overwritten once wordpress auto update itself again.
It seems fitting to start the re-blogging with a post that makes my Archive page looking better. It gave me some perspective on how long I have been blogging. Especially in today’s world, where so few still do. and even if they do, they do it in the most trendy site such as medium or tumblr. So why do i bother to keep tweaking this wordpress site? I think one reason is because i could do tweaks like this. I can fix things to my liking.
Then why haven’t I blogged for so long? Well actually I have been blogging, just not in English. I’m still able to find interesting blogs to read, interesting personalities to follow on the Chinese part of the net. But i haven’t been able to find the same in the English side. It seems everyone who used to blog in English are all busy twittering or slacking or somewhere i no longer can venture into… 🙁
I myself is just as guilty. So I will try to write more in English. We shall see. 🙂