go41

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

von Joern am 3. Jun. 2010 | Keine Kommentare

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 site
To add a second side bar. In my case I want to be able to add sidebar 1.
Right now the second sidebar or sidebar 2 has the following widgets in this order.
Pages

Blog roll

Meta tags
here is the code of the sidebar.php file
<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>

o <?php get_links(-1, ‚ ‚, ‚

o ‚, ‚between‘, FALSE, ’name‘, FALSE, FALSE, -1, FALSE); ?> Premium wordpress themes

* <h2>Meta</h2>

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

o Valid XHTML
<?php endif; ?>
</div>

</div>

</div>
Now when I add a text widget to this sidebar, the blogroll disappears. Why does that happen? Can I not add a text widget to this sidebar, or sidebar2
So I think what I have to do is to be able to include the other sidebar in the sidebar.php file or sidebar1. It is the one where I can add text to? I don’t know where in the sidebar.php file to include the code for this sidebar, meaning sidebar1.
Lastly, if you look at the words in the sidebar what is up, they are to the left too much. I can’t find what class they are in using Firebug. How do you get them to move to the right? Also, I can’t find the div class to control the font color for the text widget text in CSS.
Your help is needed here my friend.

(von: omerkhan01)

Hier noch 6 weitere Ergebnisse dieses Threads:

need your quick help on text widget code in sidebar

2. Jun. 2010 (von: omerkhan01)

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 sidebarCode:<div id="rcolumn"><?php include (TEMPLATEPATH .…

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 Google+, Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


weitere forum Beiträge: