Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

Untitled

By: SRD75 on Nov 5th, 2013  |  syntax: PHP  |  size: 0.76 KB  |  views: 42  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. function piedmont_widgets_init() {
  4.     register_sidebar(array(
  5.         'name' => 'Top Widget Area',
  6.                 'id' => 'top_widget_area',
  7.                 'before_widget' => '',
  8.         'after_widget' => '',
  9.         'before_title' => '<div class="title">',
  10.         'after_title' => '</div>',
  11.     ));
  12. }
  13.  
  14. add_action( 'widgets_init', 'piedmont_widgets_init' );
  15.  
  16. function register_my_menu() {
  17.   register_nav_menu('footer-menu',__( 'Footer Menu' ));
  18. }
  19. add_action( 'init', 'register_my_menu' );
  20.  
  21. function my_custom_style(){
  22.   global $post;
  23.   if ( !empty ( $post->post_name ) && $post->post_name == 'calendar-of-events' ){ ?>
  24.       <style type="text/css">
  25.         #main { background-image: none; }
  26.       </style>
  27.   <?php }
  28. }
  29.  
  30. add_action ( 'wp_head', 'my_custom_style' );
  31.  
  32. ?>
clone this paste RAW Paste Data