Tickets just went on sale for WordCamp Riverside 2019. I can’t believe this is our third year of Free and Open Source Software collaboration.
If you’re going to be in the Riverside CA area November 8-10, 2019 consider buying a ticket and attending.
From the desktop of Joseph Dickson
Tickets just went on sale for WordCamp Riverside 2019. I can’t believe this is our third year of Free and Open Source Software collaboration.
If you’re going to be in the Riverside CA area November 8-10, 2019 consider buying a ticket and attending.
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. 🙂