Advertisement
robinbutton

Error in show home php

Feb 4th, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <?php
  2. /**
  3. * Functions file for the Lyle Gomes child them */
  4.  
  5. function lylegomes_setup() {
  6.  
  7. // This theme uses wp_nav_menu() in one location.
  8. register_nav_menu( 'secondary', __( 'Footer Menu', 'twentytwelve' ) );
  9. register_nav_menu( 'mobile', __( 'Header Menu', 'twentytwelve' ) );
  10. register_nav_menu( 'additional-portfolios', __( 'Header Menu', 'twentytwelve' ) );
  11. }
  12.  
  13.  
  14.  
  15. add_action( 'after_setup_theme', 'lylegomes_setup', 11 );
  16.  
  17. // Add the site description for the home/front page.
  18. $site_description = get_bloginfo( 'description', 'display' );
  19. if ( $site_description && ( is_home( 'Lyle Gomes' ) || is_front_page() ) )
  20. $title = "$title $sep $site_description";
  21.  
  22. function twentytwelve_child_page_menu_args( $args ) {
  23. $args['depth'] = 1;
  24. return $args;
  25. }
  26. add_filter( 'wp_page_menu_args', 'twentytwelve_child_page_menu_args', 20 );
  27.  
  28.  
  29. // Adds JavaScript for dequeuing the twenty twelve script and adding the custom one, handling the mobile navigation menu hide-and-show behavior. Note the js file name change and that get template directory was changed to get stylesheet directory
  30.  
  31.  
  32.  
  33. function lylegomes_scripts() {
  34.  
  35. wp_dequeue_script( 'twentytwelve-navigation' );
  36.  
  37. wp_enqueue_script( 'primary-mobile', get_stylesheet_directory_uri() . '/js/nav.js', array(), '1.0', true );
  38.  
  39. }
  40.  
  41.  
  42. add_action( 'wp_enqueue_scripts', 'lylegomes_scripts' );
  43.  
  44.  
  45. /**
  46. * Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link.
  47. *
  48. * @since Twenty Twelve 1.0
  49. */
  50. function twentytwelve_page_menu_args( $args ) {
  51. if ( ! isset( $args['show_home'] ) )
  52. $args['show_home'] = 'Lyle Gomes';
  53. return $args;
  54. }
  55. add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' );
  56.  
  57.  
  58. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement