is_front_page() malfunction?

I’ve a pretty basic problem that I’m surprised WP doesn’t have a native solution for (unless I’m overlooking something, hopefully). I’ve a WP site with static page set as front page in reading setting. In a plugin code, I’m trying to determine whether WP is displaying the front page and add a class to $classes … Read more

Programmatically set page_on_front

I am trying to programmatically set the ‘page_on_front’ option with the id value retrieved from the get_page_by_title command… $homepage = get_page_by_title( ‘Front Page’ ); update_option(‘page_on_front’, $homepage); update_option(‘show_on_front’, ‘page’); This isn’t working, can anyone help? 1 get_page_by_title() returns an object. Use $homepage->ID. You should also check if you really got a usable return value: $homepage = … Read more