Created
May 10, 2013 18:35
-
-
Save jafstar/5556447 to your computer and use it in GitHub Desktop.
add Seo fields to your templates
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
<?php | |
** | |
* Register Field Groups | |
* | |
* The register_field_group function accepts 1 array which holds the relevant data to register a field group | |
* You may edit the array as you see fit. However, this may result in errors if the array is not compatible with ACF | |
*/ | |
if(function_exists("register_field_group")) | |
{ | |
register_field_group(array ( | |
'id' => 'acf_seo', | |
'title' => 'SEO', | |
'fields' => array ( | |
array ( | |
'key' => 'field_518d227f42fb6', | |
'label' => 'Keywords', | |
'name' => 'keywords', | |
'type' => 'text', | |
'default_value' => '', | |
'formatting' => 'html', | |
), | |
array ( | |
'key' => 'field_518d229c42fb7', | |
'label' => 'Description', | |
'name' => 'description', | |
'type' => 'textarea', | |
'default_value' => '', | |
'formatting' => 'br', | |
), | |
), | |
'location' => array ( | |
array ( | |
array ( | |
'param' => 'post_type', | |
'operator' => '==', | |
'value' => 'page', | |
'order_no' => 0, | |
'group_no' => 0, | |
), | |
), | |
), | |
'options' => array ( | |
'position' => 'side', | |
'layout' => 'default', | |
'hide_on_screen' => array ( | |
), | |
), | |
'menu_order' => 1, | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment