Fix bug with Ordo theme

Categories: Wordpress, CMS, PHP, Programming & Scripting

Fixes a bug with the Ordo theme where the frontpage gets reset to null:

$homepage = get_page_by_title( 'Front Page' ); 
if ( $homepage ) { 
     update_option( 'page_on_front', $homepage->ID );    
     update_option( 'show_on_front', 'page' ); }

Reference: https://wordpress.stackexchange.com/questions/96066/programmatically-set-page-on-front

«
»