Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter virtualerin

    (@virtualerin)

    Like I say I am new to PHP so I am not really sure where the error in the code would be 🙂

    Here is all the code I have done so far…I hope I was to too far off:
    In function.php:
    register_sidebar(array(‘name’=>’pg_sidebar’,
    ‘before_widget’ => ‘

    • ‘,
      ‘after_widget’ => ‘
    • ‘,
      ‘before_title’ => ‘<h2><span>.: ‘,
      ‘after_title’ => ‘ :.</span></h2>’,
      ));
      In CSS:
      #pg_sidebar { background: #ebe1c8; width: 210px; float: right; margin: 0 5px 20px 0; padding: 0 auto 0 auto; vertical-align: top; }
      #left_sidebar ul li a:hover, #right_sidebar ul li a:hover, #pg_sidebar ul li a:hover { color: #660000; }
      #left_sidebar ul li a, #right_sidebar ul li a, #pg_sidebar ul li a { font-size: 1.08em; display: inline; margin: 0; padding: 0; }
      #left_sidebar ul li, #right_sidebar ul li, #pg_sidebar ul li { background: #ded3b7; display: block; padding: 0 0 3px 0; margin: 0; list-style: none; }
      #left_sidebar ul ul, #right_sidebar ul ul, #pg_sidebar ul ul { margin: 0 0 0 10px; }
      #left_sidebar ul ul ul, #right_sidebar ul ul ul, #pg_sidebar ul ul ul { margin: 0 0 0 10px; }
      #left_sidebar ul, #right_sidebar ul, #pg_sidebar ul { margin: 0 0 5px 0; padding: 0; }
      #left_sidebar h2, #right_sidebar h2, #pg_sidebar h2, #commentblock h2 { font-size: 1.06em; text-transform: uppercase; letter-spacing: normal; margin: 15px auto 5px auto; padding: 3px 3px 3px 0px; text-align: center; background: #b3a381 url(images/cat-bg.jpg) repeat; border-top: #7c7953 1px solid; border-bottom: #7c7953 1px solid; }
      In the new page template:
      <?php
      /*
      Template Name: Pg W Sidebar
      */
      ?>
      <?php get_header(); ?>

      <?php include (‘pg_sidebar.php’);?>

      <div id=”container”>

      <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>

      <div class=”post” id=”post-<?php the_ID(); ?>”>

      <h2>” title=”<?php the_title(); ?>”><?php the_title(); ?></h2>

      <div class=”entry”>

      <?php the_content(); ?>
      <?php link_pages(‘<p>Pages: ‘, ‘</p>’, ‘number’); ?>
      <?php edit_post_link(‘Edit’, ‘<p>’, ‘</p>’); ?>

      </div>

      </div>

      <?php endwhile; ?>

      <?php else : ?>

      <div class=”post”>
      <h2><?php _e(‘Not Found’); ?></h2>
      </div>

      <?php endif; ?>

      </div>

      <?php get_footer(); ?>
      Here is the code for the sidebar itself:
      <div id=”pg_sidebar.php”>

      <?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar(3) ) : else : ?>

    • <h2><?php _e(‘.: Search :.’); ?></h2>
      <div class=”search”>
      <?php include (‘searchform.php’); ?>
      </div>
    • <?php wp_list_pages(‘depth=3&title_li=<h2>.: Pages :.</h2>’); ?>

      <?php endif; ?>

    </div>

    Hope I didn’t botch this too much LOL

    Thanks again.

Viewing 1 replies (of 1 total)