• I started creating custom wordpress theme but the theme doen’s load on browser when are functions in functions.php.

    The interesting thing is that it loads perfectly when the functions.php is empty.

    here is the functions.php

    <?php
    //define the template
    define('TEMPPATH' , get_bloginfo('stylesheet_directory'));
    
    //define image path
    define('IMAGES' , TEMPPATH. "/images");
    
    //define menu
    add_theme_support('nav-menus');
    if (function_exists('register_nav_menus')) {
        register_nav_menus(
    	  array(
    	    'main' => 'Main Nav'
          )
    	 );
        }
    
    //define sidebar
    if (function_exists('register_sidebar')) {
       register_sidebar( array (
         'name' => __('Primary Sidebar', 'primary-sidebar' ).
    	 'id' => 'primary-widget-area',
    	 'description' => __('The primary widget area', 'dir' ),
    	 'before_widget' => '<div class="widget">',
    	 'after-widget' => "</div>",
    	 'before_title' => '<h3 class="widget-title">' ,
    	 'after_title' => '</h3>' ,
    	) );
       }
    <div class="widget">
       <h3 class="widget-title">Hello World!</h3>
       <p>Here is some content for a widget!</p>
    </div>
    
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘functions.php problem’ is closed to new replies.