Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. include_once( 'acf.php' );
  2. define( 'ACF_LITE', true );
  3.  
  4. function create_posttype() {
  5. register_post_type( 'menyside',
  6. array(
  7. 'labels' => array(
  8. 'name' => __( 'Menysider' ),
  9. 'singular_name' => __( 'Menyside' )
  10. ),
  11. 'public' => true,
  12. 'has_archive' => false,
  13. 'rewrite' => array('slug' => 'meny'),
  14. 'supports' => array( 'title', 'editor', 'comments', 'excerpt', 'custom-fields', 'thumbnail' ),
  15. )
  16. );
  17. }
  18. add_action( 'init', 'create_posttype' );
  19. add_action( 'plugins_loaded', array( $this, 'acf_fields' ) );
  20. add_theme_support( 'post-thumbnails','menyside');
  21.  
  22. if( function_exists('acf_add_local_field_group') ):
  23.  
  24. acf_add_local_field_group(array (
  25. 'key' => 'group_56b90ec45265a',
  26. 'title' => 'menufields',
  27. 'fields' => array (
  28. array (
  29.  
  30. ...... (continued, data from PHP output from ACF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement