go41

need your quick help on text widget code in sidebar

von Joern am 2. Jun. 2010 | Keine Kommentare

I am using a theme called verna. It is currently using sidebar2 however all of the cool things like the page navigation, text widgets can be added to sidebar1.
Here is the code for the sidebar
Code:

<div id="rcolumn">

<?php include (TEMPLATEPATH . '/banner.php'); ?>
<div class="tabdiv">

<h2>Recent Posts</h2>

         <?php

      $my_query = new WP_Query('showposts=5');

      while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;

      ?>

      <?php $screen = get_post_meta($post->ID, 'screen', $single = true); ?>

        <img class="smalim" src="<?php echo ($screen); ?>" width="60" height="45" alt=""  />

       " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>

      <?php endwhile; ?>

</div>

<div id="sidebar">

<div class="sidebar2">

<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar 2') ) : else : ?>

         <h2>Blogroll</h2>

            <?php get_links(-1, '
', '
', 'between', FALSE, 'name', FALSE, FALSE, -1, FALSE); ?>

Premium wordpress themes

Code:

<h2>Meta</h2>

            <?php wp_register(); ?>
<?php wp_loginout(); ?>

Valid XHTML

<?php endif; ?>

</div>

</div>

</div>
As you can see it is only calling sidebar2. I want sidebar1 to be called
Here is the code for sidebar1.
<div class="sidebar1">

<?php if ( function_exists(‚dynamic_sidebar‘) && dynamic_sidebar(’sidebar 1′) ) : else : ?>

<h2>Pages</h2>

<?php wp_list_pages(‚title_li=‘); ?>

<?php wp_list_categories(‚orderby=name&show_count=0&title_li=<h2>Categories</h2>‘); ?>

<h2>Archives</h2>

<?php wp_get_archives(‚type=monthly&limit=12‘); ?>

<?php endif; ?>

</div>
Where can I add this into the sidebar.php file so that it shows up.
Omar

(von: omerkhan01)

Hier noch 6 weitere Ergebnisse dieses Threads:

Re: need your quick help on text widget code in sidebar :: Reply by omerkhan01

3. Jun. 2010 (von: omerkhan01)

Joern, here is what I meant. I want to be able to add sidebars to my theme. I have one sidebar, but I cannot add a text widget to it.Here are the instructions that I got from this siteTo add…

Re: need your quick help on text widget code in sidebar :: Reply by Joern

3. Jun. 2010 (von: Joern)

in your sidebar2 is the followingCode:if ( function_exists('dynamic_sidebar') && dynamic_sidebar('sidebar 2') ) : else : reads: as soon you assign a widget to this bar the blogroll and meta will not be displayed, it's in the 'else' statement.You can however…

Re: need your quick help on text widget code in sidebar :: Reply by omerkhan01

3. Jun. 2010 (von: omerkhan01)

Joern, I figured it out. In the index.php file, replace Code:<php get sidebar()> withCode:<?php include("sidebar.php"); ?><?php include("sidebar2.php"); ?>This will put both sidebars there.So as you can see by going to my site that both sidebars come up.My only question isHow to move…

Re: need your quick help on text widget code in sidebar :: Reply by omerkhan01

3. Jun. 2010 (von: omerkhan01)

Joern, I got the text to align to the right and did locate the class for it.I went to "view source" and then I saw that it was in a class called textwidgetI then added this into stylesheet.css as .textwidget…

Re: need your quick help on text widget code in sidebar :: Reply by Joern

3. Jun. 2010 (von: Joern)

these sentences are in .sidebar2 ul lithis is set to width:268px;you could try 310pxor you set .textwidget from 100% to about 310pxafter any change always check in different browsers the full sidebar, changes might have an effect to other things…

Re: need your quick help on text widget code in sidebar :: Reply by omerkhan01

3. Jun. 2010 (von: omerkhan01)

Worked perfectly. I should have seen that. I am now learning to work from instinct and genius. ! Thanks man! Weiterlesen →

Autor:

Du findest mich auch auf Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

weitere forum Beiträge: