Help with wordpress theme

Discussion in 'HTML & Website Design' started by ALiveGeek, Oct 4, 2009.

  1. #1
    Im working on a collection of wordpress blogs each under a subdomain of the main livegeek.info its largely unfinished because i ran into a problem.

    The navbar at the top shows pages for that blog, I would rather use direct links to the other blogs subdomain.livegeek.info. Im using wordpress and the theme code is too advanced for me to find and replace it.

    If anyone has any help or advice to offer I would really appreciate it!
     
    ALiveGeek, Oct 4, 2009 IP
    MhW likes this.
  2. MhW

    MhW Active Member

    Messages:
    370
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    85
    #2
    To add your own nav links

    Open /themes/arclite/header.php

    Find and Delete (lines 131-147 inclusive):
    <?php
              if((get_option('show_on_front')<>'page') && (get_option('arclite_topnav')<>'categories')) {
               if(is_home() && !is_paged()){ ?>
                <li id="nav-homelink" class="current_page_item"><a class="fadeThis" href="<?php echo get_settings('home'); ?>" title="<?php _e('You are Home','arclite'); ?>"><span><?php _e('Home','arclite'); ?></span></a></li>
               <?php } else { ?>
                <li id="nav-homelink"><a class="fadeThis" href="<?php echo get_option('home'); ?>" title="<?php _e('Click for Home','arclite'); ?>"><span><?php _e('Home','arclite'); ?></span></a></li>
              <?php
               }
              } ?>
             <?php
               if(get_option('arclite_topnav')=='categories') {
                echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><a class="fadeThis"$2><span>$3</span></a>', wp_list_categories('show_count=0&echo=0&title_li='.get_option('arclite_excludenav')));
                }
               else {
                 echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><a class="fadeThis"$2><span>$3</span></a>', wp_list_pages('echo=0&orderby=name&title_li=&exclude='.get_option('arclite_excludenav')));
               }
              ?>
    Code (markup):
    This will leave you with:
    <ul id="nav">
             
            </ul>
    Code (markup):
    Now you just need to add your own links between the <ul> tags, use the following format:
    <li id="nav-homelink"><a class="fadeThis" href="#"><span>Link Text</span></a></li>
    Code (markup):
    Using the above code will apply the appropriate styling to items on the nav bar, and will also make sure it keeps the jQuery fade effect.

    --

    Adding a "Pages" block to the side bar

    You'll probably want to keep the pages functionality going, so to add pages to the side bar:

    Open /themes/arclite/sidebar.php

    Find (~line 51):
    <?php // wp_list_bookmarks('category_before=&category_after=&title_li=&title_before=&title_after='); ?>
    Code (markup):
    Below, Add:
        <li class="block">
          <!-- box -->
          <div class="box">
           <div class="titlewrap"><h4><span>Pages</span></h4></div>      
           <div class="wrapleft">
            <div class="wrapright">
             <div class="tr">
              <div class="bl">
               <div class="tl">
                <div class="br the-content">
                 <ul>
                  <?php wp_list_pages("title_li=") ?>
                 </ul>
                </div>
               </div>
              </div>
             </div>
            </div>
           </div>
          </div>
          <!-- /box -->
        </li>
    Code (markup):
    --

    Save all modified files and upload. That's it :)
     
    MhW, Oct 4, 2009 IP
  3. ALiveGeek

    ALiveGeek Peon

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wow... thank you so much. I couldn't have asked for more detailed help
     
    ALiveGeek, Oct 4, 2009 IP