Results 1 to 5 of 5

Thread: Broken theme header

  1. #1
    Thread Starter
    Senior Member khuya's Avatar
    Join Date
    Mar 2012
    Location
    Zimbabwe
    Posts
    114
    Thanks
    27
    Thanked 1 Time in 1 Post

    Question Broken theme header

    I was trying to add more menus so i went into the Theme-header.php and edited it as follows and silly me i did not save it before making my changes and now it's broken

    Issue:
    I added the following menus:
    Register Now
    Manage my Ads

    Now if you click on either of those menus or About Us or Blog, the Classifieds Menu and Ad Location Menus will only point to the last menu clicked. So if you click on 'About Us' and then try to client on 'Classifieds Home', my site no longer takes you to 'Classifieds hOME' but instead appends to that link so that you remain on the same 'About Us' page.

    Please help. I was just trying to add the two menus and I may have gone about it in the wrong way…?

    To test this error you can visit my site www.afrocomplete.com

    Below is the code as it stands broken now:

    <?php

    /**
    * Add header elements via the wp_head hook
    *
    * Anything you add to this file will be dynamically
    * inserted in the header of your theme
    *
    * @since 3.0.0
    * @uses wp_head
    *
    */

    global $wpdb;

    // adds CP version number in the header for troubleshooting
    function cp_version($app_version) {
    global $app_version, $app_db_version;
    echo '<meta name="version" content="ClassiPress '.$app_version.'" />' . "\n";
    echo '<meta name="db-version" content="'.$app_db_version.'" />' . "\n";
    }
    add_action('wp_head', 'cp_version');


    // adds support for cufon font replacement
    function cp_cufon_styles() { //TODO: move into theme-enqueue

    if ( get_option('cp_cufon_enable') != 'yes' ) return;
    ?>
    <!--[if gte IE 9]> <script type="text/javascript"> Cufon.set('engine', 'canvas'); </script> <![endif]-->
    <!-- cufon fonts -->
    <script src="<?php echo get_bloginfo('template_directory') ?>/includes/fonts/Vegur_400-Vegur_700.font.js" type="text/javascript"></script>
    <script src="<?php echo get_bloginfo('template_directory') ?>/includes/fonts/Liberation_Serif_400.font.js" type="text/javascript"></script>
    <!-- end cufon fonts -->

    <!-- cufon font replacements -->
    <script type="text/javascript">
    // <![CDATA[
    <?php echo stripslashes(get_option('cp_cufon_code')). "\n"; ?>
    // ]]>
    </script>
    <!-- end cufon font replacements -->

    <?php
    }
    add_action('wp_head', 'cp_cufon_styles');


    // add the main header
    function cp_header() {
    ?>

    <!-- HEADER -->
    <div class="header">

    <div class="header_top">

    <div class="header_top_res">

    <p>
    <?php echo cp_login_head(); ?>

    <a href="<?php if (get_option('cp_feedburner_url')) echo get_option('cp_feedburner_url'); else echo get_bloginfo_rss('rss2_url').'?post_type='.APP_POS T_TYPE; ?>" target="_blank"><img src="<?php bloginfo('template_url'); ?>/images/icon_rss.gif" width="16" height="16" alt="rss" class="srvicon" /></a>

    <?php if ( get_option('cp_twitter_username') ) : ?>
    &nbsp;|&nbsp;
    <a href="http://twitter.com/<?php echo get_option('cp_twitter_username'); ?>" target="_blank"><img src="<?php bloginfo('template_url'); ?>/images/icon_twitter.gif" width="16" height="16" alt="tw" class="srvicon" /></a>
    <?php endif; ?>
    </p>

    </div><!-- /header_top_res -->

    </div><!-- /header_top -->


    <div class="header_main">

    <div class="header_main_bg">

    <div class="header_main_res">

    <div id="logo">

    <?php if ( get_option('cp_use_logo') != 'no' ) { ?>

    <?php if ( get_option('cp_logo') ) { ?>
    <a href="<?php echo home_url(); ?>"><img src="<?php echo get_option('cp_logo'); ?>" alt="<?php bloginfo('name'); ?>" class="header-logo" /></a>
    <?php } else { ?>
    <a href="<?php echo home_url(); ?>"><div class="cp_logo"></div></a>
    <?php } ?>

    <?php } else { ?>

    <h1><a href="<?php echo get_option('classifieds home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    <div class="description"><?php bloginfo('description'); ?></div>

    <?php } ?>

    </div><!-- /logo -->

    <?php if ( get_option('cp_adcode_468x60_enable') == 'yes' ) { ?>

    <div class="adblock">

    <?php appthemes_header_ad_468x60();?>

    </div><!-- /adblock -->

    <?php } ?>

    <div class="clr"></div>

    </div><!-- /header_main_res -->

    </div><!-- /header_main_bg -->

    </div><!-- /header_main -->


    <div class="header_menu">

    <div class="header_menu_res">

    <a href="<?php echo CP_ADD_NEW_URL ?>" class="obtn btn_orange"><?php _e('Post an Ad', 'appthemes') ?></a>

    <ul id="nav">

    <li class="<?php if (is_home()) echo 'page_item current_page_item'; ?>"><a href="<?php echo get_option('classifieds home')?>"><?php _e('Classifieds Home','appthemes'); ?></a></li>
    <li class="mega"><a href="#"><?php _e('Ad Location','appthemes'); ?></a>
    <div class="adv_categories" id="adv_categories">
    <?php echo cp_create_categories_list( 'menu' ); ?>
    </div><!-- /adv_categories -->
    </li>
    <li class="mega"><a href="http://afrocomplete.com/wp-login.php?action=register"><?php _e('Register Now','appthemes'); ?></a>
    </li>
    <li class="mega"><a href="http://afrocomplete.com/dashboard/"><?php _e('Manage My Ads','appthemes'); ?></a>
    </li>
    </ul>

    <?php wp_nav_menu( array('theme_location' => 'primary', 'fallback_cb' => 'appthemes_default_menu', 'container' => false) ); ?>

    <div class="clr"></div>


    </div><!-- /header_menu_res -->

    </div><!-- /header_menu -->

    </div><!-- /header -->

    <?php
    }
    // hook into the correct action
    add_action('appthemes_header', 'cp_header');


    // remove the WordPress version meta tag
    if (get_option('cp_remove_wp_generator') == 'yes')
    remove_action('wp_head', 'wp_generator');

    // remove the new 3.1 admin header toolbar visible on the website if logged in
    if (get_option('cp_remove_admin_bar') == 'yes')
    add_filter('show_admin_bar', '__return_false');

  2. #2
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

  3. The Following User Says Thank You to samcy For This Useful Post:

    khuya (May 22nd, 2012)

  4. #3
    Thread Starter
    Senior Member khuya's Avatar
    Join Date
    Mar 2012
    Location
    Zimbabwe
    Posts
    114
    Thanks
    27
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #4
    Marketplace Seller mohsinoffline's Avatar
    Join Date
    Dec 2011
    Location
    Algeria
    Posts
    1,575
    Thanks
    44
    Thanked 213 Times in 192 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Attached Files Attached Files
    Do you need content that helps to rank your website better on Google? Check out https://aicontently.com

    Create a website like Retailmenot with FlatterPro Theme , Check out the demo here Retailmenot





  6. The Following User Says Thank You to mohsinoffline For This Useful Post:

    khuya (May 22nd, 2012)

  7. #5
    Thread Starter
    Senior Member khuya's Avatar
    Join Date
    Mar 2012
    Location
    Zimbabwe
    Posts
    114
    Thanks
    27
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. broken links only to the theme
    By admin1 in forum Help Using ClassiPress
    Replies: 13
    Last Post: May 30th, 2011, 08:12 AM
  2. [SOLVED] 3.0.5.1 Theme Install Failure/Broken Message
    By lcolley in forum Help Using ClassiPress
    Replies: 3
    Last Post: November 17th, 2010, 04:33 PM
  3. The active theme is broken. Reverting to the default theme.
    By Yoganomics in forum Help Using ClassiPress
    Replies: 1
    Last Post: June 21st, 2010, 03:58 AM
  4. Try to have clean install say theme is broken?
    By chifen in forum Help Using ClassiPress
    Replies: 2
    Last Post: April 7th, 2010, 09:35 PM
  5. The active theme is broken. Reverting to the default theme.
    By Yoganomics in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: December 31st, 1969, 07:00 PM