WP Rig Menu Component
Today, I expanded my Nav_Menus Component in WP Rig to add an additional menu in my footer. Because you can’t have a WordPress website without multiple menus right?
From the desktop of Joseph Dickson
Today, I expanded my Nav_Menus Component in WP Rig to add an additional menu in my footer. Because you can’t have a WordPress website without multiple menus right?
I recently worked on a documentation project that required posts to be sorted alphabetically by title. The process can be done by using pre_get_posts() and the is_archive() conditional tag.
/*
* Order post archives by title in descending order
*/
add_action( 'pre_get_posts', 'jd_archive_sort_alpha_title');
function jd_archive_sort_alpha_title($query){
if(is_archive()) {
// Set the order to ascending order
$query->set( 'order', 'ASC' );
// set the orderby to title
$query->set( 'orderby', 'title' );
}
};
As always if you want to use this plugin on your website test it first in a safe environment to verify that it doesn’t create a conflict. Happy hacking. 🙂
I figured out how to enable Custom Post Formats in WP Rig. Deployed an updated theme. I deleted my old theme ready to install the new one only to discover I deleted my localhost install of WP Rig and not the theme on this website. Woops!
I didn’t backup WP Rig on my localhost so I’ll need to rebuild my changes from the beginning.