Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlawok/46992a91972877538451cfc11cfbda0a to your computer and use it in GitHub Desktop.
Save xlawok/46992a91972877538451cfc11cfbda0a to your computer and use it in GitHub Desktop.
Wodpress change order and header of pods fields
add_action('pods_meta_groups', 'customize_frontpage',10,2);
function customize_frontpage($type, $name){
global $post_ID, $post_type;
if ( empty ( $post_ID ) or 'page' !== $post_type )
return;
if ( $post_ID === (int) get_option( 'page_on_front' ) ){
//change order and header of pods fields
pods_group_add('page','Pola Strony głównej','front_page_banner','normal','high');
}
else
//hide fields
pods_group_add('page','Pola Strony',false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment