Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. <?php
  2. if ( ! isset( $content_width ) )
  3. $content_width = 630;
  4.  
  5.  
  6. add_action( 'after_setup_theme', 'gray_white_black_setup' );
  7.  
  8. function gray_white_black_setup() {
  9.  
  10. add_editor_style();
  11. add_theme_support('automatic-feed-links');
  12. add_theme_support('post-thumbnails');
  13.  
  14. set_post_thumbnail_size( 240, 120, true ); // Default size
  15.  
  16. // Make theme available for translation
  17. // Translations can be filed in the /languages/ directory
  18. load_theme_textdomain('gray_white_black', get_template_directory() . '/languages');
  19.  
  20.  
  21. register_nav_menus(
  22. array(
  23. 'primary' => __('Header Menu', 'gray_white_black'),
  24. 'secondary' => __('Footer Menu', 'gray_white_black')
  25. )
  26. );
  27.  
  28. }
  29.  
  30. function gray_white_black_widgets() {
  31. register_sidebar(array(
  32. 'name' => __( 'Sidebar Widget Area', 'gray_white_black'),
  33. 'id' => 'sidebar-widget-area',
  34. 'description' => __( 'The sidebar widget area', 'gray_white_black'),
  35. 'before_widget' => '<div class="widget">',
  36. 'after_widget' => '</div>',
  37. 'before_title' => '<h3>',
  38. 'after_title' => '</h3>',
  39. ));
  40. }
  41.  
  42.  
  43. add_action ( 'widgets_init', 'gray_white_black_widgets' );
  44.  
  45. function gray_white_black_enqueue_comment_reply() {
  46. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
  47. wp_enqueue_script( 'comment-reply' );
  48. }
  49. }
  50. add_action( 'wp_enqueue_scripts', 'gray_white_black_enqueue_comment_reply' );
  51.  
  52.  
  53. function gray_white_black_page_menu() {
  54. if (is_page()) { $highlight = "page_item"; } else {$highlight = "menu-item current-menu-item"; }
  55. echo '<ul class="menu">';
  56. wp_list_pages('sort_column=menu_order&title_li=&link_before=&link_after=&depth=3');
  57. echo '</ul>';
  58. }
  59.  
  60. function gray_white_black_page_menu_flat() {
  61. if (is_page()) { $highlight = "page_item"; } else {$highlight = "menu-item current-menu-item"; }
  62. echo '<ul class="menu">';
  63. wp_list_pages('sort_column=menu_order&title_li=&link_before=&link_after=&depth=1');
  64. echo '</ul>';
  65. }
  66.  
  67. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement