[wp-hackers] Static Front page setting, accessing from a plugin?

esmi at quirm dot net esmi at quirm.net
Sun Jan 3 21:22:23 UTC 2010


on 03/01/2010 20:43 John Eckman said the following:
> Hello and happy new year all.
> 
> Is it possible to access, from inside a plugin, whether the user has
> set a static homepage, and if so, what they have as their posts-page?

<?php if( get_option('show_on_front' ) == 'page' ) $posts_page_id = 
get_option('page_for_posts');?>

<http://codex.wordpress.org/Function_Reference/get_option>
<http://codex.wordpress.org/Option_Reference>

HTH

esmi


More information about the wp-hackers mailing list