Created
June 7, 2020 13:47
-
-
Save xlawok/46992a91972877538451cfc11cfbda0a to your computer and use it in GitHub Desktop.
Wodpress change order and header of pods fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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