RedeemedLife
Forum Replies Created
-
Forum: Plugins
In reply to: How do I control the positioning of two Plugins?I wish I could figure it out on my own… :/
Forum: Fixing WordPress
In reply to: Fatal Error when visiting any other page on the blog.Well, that fixed the fatal error I was getting.
Which is good, because now the pages say ‘Not Found’ like they should, instead of Fatal Error.
Thanks!
Forum: Plugins
In reply to: How do I control the positioning of two Plugins?…aaand again.
Forum: Plugins
In reply to: How do I control the positioning of two Plugins?Trying again.
Forum: Plugins
In reply to: How do I control the positioning of two Plugins?Anyone?
Forum: Plugins
In reply to: How do I control the positioning of two Plugins?Is there no way to force one plugin to display above or below another?
Where in the code is that controlled? If I can find the code that tell which pluging to display first, I’m sure I can monkey with it.
Forum: Plugins
In reply to: How do I control the positioning of two Plugins?Hmm, anyone?
Wow! It really worked! Thanks so much!
Ok, here’s my index.php file:
<?php get_header(); ?> <?php get_sidebar(); ?> <div id="Content"> <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <div class="post"> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="entry"> <?php the_content(); ?> <p class="postmetadata"> <?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php the_author(); ?><br /> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?> </p> </div> </div> <?php endwhile; ?> <div class="navigation"> <?php posts_nav_link(); ?> </div> <?php else : ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><?php_e('Not Found'); ?></h2> </div> <?php endif; ?> </div> <?php get_footer(); ?> </div> </body> </html>I’m looking at the line on top
<?php get_sidebar(); ?>, do I need to change that to:<?php get_sidebar(1); ?>…and put:
<?php get_sidebar(2); ?>…where I want the second sidebar to be?
Wow, I think that did it!
I see the sidebar on the left kept the ‘BlockContent’ CSS settings, and I don’t see the sidebar on the right yet, but I’m pretty sure that’s because I need to edit my index.php to call it.
Thanks so much! I’m going to hit the index file and see if I can get it…
Ok, So I edit my functions.php so that it says:
<?php $args = array( 'name' => sprintf(__('Sidebar %d'), $i ), 'id' => 'sidebar-$i', 'description' => '', 'before_widget' => '<div id="%1$s" class="BlockContent %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ); if ( function_exists('register_sidebar') ) register_sidebar($args); ?>…but I think I may have broken something else, because not only do two sidebars not show up on the site or in the admin widget section, the only sidebar showing in the admin widget section is ‘Sidebar 0’ and if I add a widget to that, it doesn’t reflect it on the site.
Here’s my sidebar.php and sidebar-right.php code:
<div class="Left"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?> <br /> <div class="BlockContent"> <h2><?php _e('Calendar'); ?></h2> <?php get_calendar(); ?> </div> <br /> <div class="BlockContent"> <?php wp_list_pages('depth=3&title_li=<h2>Pages</h2>'); ?> </div> <br /> <div class="BlockContent"> <h2><?php _e('Categories'); ?></h2> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </div> <br /> <div class="BlockContent"> <h2><?php _e('Archives'); ?></h2> <?php wp_get_archives('type=monthly'); ?> </div> <br /> <div class="BlockContent"> <?php get_links_list(); ?> </div> <br /> <div class="BlockContent"> <h2><?php _e('Meta'); ?></h2> <?php wp_register(); ?> <?php wp_loginout(); ?> <?php wp_meta(); ?> </div> <?php endif; ?> </div>(The only different between the two is the div class on the first line.)
…and here’s the code in my functions.php:
<?php $args = array( 'name' => sprintf(__('Sidebar %d'), $i ), 'id' => 'sidebar-$i', 'description' => '', 'before_widget' => '<div id="%1$s" class="BlockContent %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ); if ( function_exists('register_sidebar') ) register_sidebar($args); ?>Ok, so I make my functions.php say this (From what I could see, both code snippets look identical):
<?php $args = array( 'name' => sprintf(__('Sidebar %d'), $i ), 'id' => 'sidebar-$i', 'description' => '', 'before_widget' => '<div id="%1$s" class="BlockContent %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>' ); if ( function_exists('register_sidebar') ) register_sidebar($args); ?>…and I just make another sidebar file (I’m going to call it sidebar-right.php) with identical code?
Do I need to edit the second sidebar and the first to distinguish them from each other? For example, do I need to edit the line of code “
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>” at the top for the two sidebars to make them different?Do I also have to do anything extra to make the sidebars show up in the widget admin section?
Hmm, I just found the following code on this site: Creating Multiple Dynamic Sidebars
The code is:
<?php if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'sidebar1', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h4>', 'after_title' => '</h4>', )); register_sidebar(array('name'=>'sidebar2', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h4>', 'after_title' => '</h4>', )); ?>I can see where it’s mapping the two sidebars, but how to I edit this code to make it so the sidebars use the ‘BlockContent’ CSS rules?
Forum: Themes and Templates
In reply to: When adding widgets, the CSS coding is lost.Yea, I’m going to be adding a second sidebar to the site once I figure out the widgets issue.
The filename is sidebar-right.php. Here’s it’s code (I think it’s just a copy of sidebar.php):
<div class="Left"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar2() ) : else : ?> <br /> <div class="BlockContent"> <h2><?php _e('Calendar'); ?></h2> <?php get_calendar(); ?> </div> <br /> <div class="BlockContent"> <?php wp_list_pages('depth=3&title_li=<h2>Pages</h2>'); ?> </div> <br /> <div class="BlockContent"> <h2><?php _e('Categories'); ?></h2> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </div> <br /> <div class="BlockContent"> <h2><?php _e('Archives'); ?></h2> <?php wp_get_archives('type=monthly'); ?> </div> <br /> <div class="BlockContent"> <?php get_links_list(); ?> </div> <br /> <div class="BlockContent"> <h2><?php _e('Meta'); ?></h2> <?php wp_register(); ?> <?php wp_loginout(); ?> <?php wp_meta(); ?> </div> <?php endif; ?> </div>Forum: Themes and Templates
In reply to: When adding widgets, the CSS coding is lost.Hmm, I did that, but now when I add a widget in the admin area, it doesn’t change on the page.
Did I need to put
<?php register_sidebar( $args ); ?>somewhere?The link to the page is dev.hesedbooksandgifts.com