Forum Replies Created

Viewing 15 replies - 16 through 30 (of 34 total)
  • Hi,

    Either change your theme’s category.php so that it gives a different result when you show the parent category
    (e.g. if parentcategory ..DO THIS.. else ..DO THAT..)

    Or (which is probably easier) make a special template just for this parent category (e.g. category-4.php ) and make sure this displays only the description and it’s childs. (e.g. wp_list_categories)

    I could help you better if you would post your category.php code here!

    Hi, see if this works for you:

    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $s = get_query_var('s');
    query_posts("s=$s&cat=-9,-14&paged=$page");
    ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_title(); ?><br /><br />
    <?php endwhile;endif;?>
    <?php next_posts_link('&laquo; Old Updates') ?>
    <?php previous_posts_link('Latest Updates &raquo;') ?>

    see if your theme has a footer.php

    insert this

    <?php wp_title(); ?>

    where you would like your title
    see if that works for you!

    Forum: Fixing WordPress
    In reply to: Heading Question

    what code do you use to get the page heading?

    no, you can’t use php code in posts or pages unless you use a plugin for it.

    try phpexec for example. (copy the text, rename to phpexec.php and upload into your plugins directory)

    then simply put your code between <phpcode> … </phpcode>

    delete either this line:

    <?php include(TEMPLATEPATH."/podcastsidebar.php"); ?>

    or this line:

    <?php get_sidebar('podcastsidebar.php'); ?>

    because they both call for the same sidebar, so that’s why you get it twice.

    Hi,

    open your theme’s sidebar.php and look for this function call:

    wp_list_pages

    it will probably look something similar to:

    <?php wp_list_pages('exclude=14&title_li=')?>

    now make sure that

    sort_column=menu_order

    is in your theme’s wp_list_pages function call.

    for example:

    <?php wp_list_pages('exclude=14&sort_column=menu_order&title_li=')?>

    Now all you have to do is give each page an order id (0,1,2,3,…)
    in the admin part of your site (edit–>page)

    Hope this solves it

    Hi,

    try this instead:

    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("cat=16&paged=$page");

    see if this solves it!

    yes, i should have mentioned it, if there is a single.php file in your theme’s directory, it will overide index.php, then this is the page responsible for how your post’s pages look.

    So all the elements you want to show (like header, sidebar, footer) when viewing a post should be called for in single.php

    Try to copy index.php and rename it to single.php just to see if this fixes your missing sidebar.

    Hi,
    your theme does indeed have just one line to call for both the sidebars. that means that your theme’s sidebar.php must contain the code for both the sidebars. it will probably look something like this:

    <div id="sidebar1" class="sidecol">
           code for sidebar 1
    </div>
    <div id="sidebar2" class="sidecol">
           code for sidebar 2
    </div>

    So you now you need to split them so we can put your content in betweens them. put this part of code:

    <div id="sidebar1" class="sidecol">
           code for sidebar 1
    </div>

    in a new file called leftsidebar.php and put the other part of the code:

    <div id="sidebar2" class="sidecol">
           code for sidebar 2
    </div>

    in a new file called rightsidebar.php
    Note that both files start with a div and end with a closing div tag.(eg <div>..</div>)

    Now you have to change your index.php ( and page.php, category.php, tag.php, search.php and so on…) so that

    <?php get_sidebar();?>

    gets replaced by two calls for our new two sidebar files. Your index.php will probably look like this afterwards:

    <?php get_header();?>
    
    <?php include(TEMPLATEPATH."/leftsidebar.php"); ?>
    
    <div id="main">
    
    	<div id="content">
    
    	    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    	        <div class="post" id="post-<?php the_ID(); ?>">
    
                <p class="date">
    
                  <span class="month">
    
                    <?php the_time('M') ?>
    
                  </span>
    
                  <span class="day">
    
                    <?php the_time('d') ?>
    
                  </span>
    
                  <span class="year">
    
                    <?php the_time('Y') ?>
    
                  </span>
    
                  </p>
    
                <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
                <div class="meta">
    
    				      <p>Published by <?php the_author_posts_link() ?>  under <?php the_category(',') ?> <?php edit_post_link(); ?></p>
    
    			      </div>
    
    			      <div class="entry">
    
                  <?php the_content(__('Continue Reading »')); ?>
    
                  <?php wp_link_pages(); ?>
    
                  <p class="post-tags">
    
                    <?php if (function_exists('the_tags')) the_tags('Tags: ', ', ', '<br />'); ?>
    
                  </p>
    
          			</div>
    
                <p class="comments">
    
                  <?php comments_popup_link(__('No comments yet'), __('One comment so far'), __('% responses so far')); ?>
    
                </p>	          
    
    	        </div>
    
          <?php endwhile; else: ?>
    
              <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    
          <?php endif; ?>
    
          <p align="center"><?php posts_nav_link(' - ','« Prev','Next »') ?></p>
    
    	</div>
    
      <?php include(TEMPLATEPATH."/rightsidebar.php"); ?>
    
      <?php get_footer();?>

    Notice the differences:

    just after

    <?php get_header();?>

    i put this line for your left sidebar:

    <?php include(TEMPLATEPATH."/leftsidebar.php"); ?>

    and i replaced

    <?php get_sidebar();?>

    by

    <?php include(TEMPLATEPATH."/rightsidebar.php"); ?>

    this should be the trick to achieve what you want, although you still might need to change some style properties in your css file(like align, margins, etc,).

    You need to change

    <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>

    into

    <title><?php bloginfo('name'); ?> <?php wp_title('|'); ?></title>

    if you don’t specify a character in wp_title(); it defaults the “>>’ symbol.

    Hi,

    the first thing you need to do is to create the theme file that is going to define the ‘special’ sidebar. The easiest way of doing this would be to copy the current sidebar.php and rename it to (for example) new_sidebar.php

    next you need to alter this new_sidebar.php to fit your specific needs.

    now you need to make sure this new sidebar is linked to the specific category (category-3 or podcast in your case). There are two ways of doing this:

    1) if you already have a category-3.php file in your theme’s directory you only need to replace the

    <?php get_sidebar(); ?>

    code with this code :

    <?php include(TEMPLATEPATH."/new_sidebar.php"); ?>

    This is all.

    2) if your theme does not have a category-3.php file, you need to edit the category.php file and replace this code:

    <?php get_sidebar(); ?>

    with this code:

    <?php if(is_category('3')){include(TEMPLATEPATH."/new_sidebar.php");}else{get_sidebar();};?>

    I hope this helps you solve your problem.

    I don’t know the theme you are describing, but to have your content between the two sidebars you need to change the order in your theme’s files.

    for example, if you open your theme’s index.php, it will probably look something like this:

    <?php get_header(); ?>
    code for content also know as "the loop"
    code for sidebar 1
    code for sidebar 2
    <?php get_footer(); ?>

    you need to change the order into something like this:

    <?php get_header(); ?>
    code for sidebar 1
    code for content also know as "the loop"
    code for sidebar 2
    <?php get_footer(); ?>

    You need to do this for all theme files that generate a complete page (like index.php, page.php, category.php, tag.php, search.php and so on…)

    Also if your layout looks all scrambled afterwards, you need to edit the css properties for both the sidebars and the content to fit your needs. Since i have no clue about how your css looks, i can’t give you more specific help. I hope you understand what i suggest.

    Hi,

    it looks like you forgot to put the

    <?php get_sidebar(); ?>

    code in your theme’s index.php

    Because the

    <div id="sidebar">

    is missing in every post’s source, i suppose this is not a style (css) issue but rather a theme issue.

    Forum: Fixing WordPress
    In reply to: Main content

    Hi,

    i would simply add this to your theme’s .css file:

    .entry{
               margin-left: 100px;
    }
    
    .comment{
               margin-left: 100px;
    }

    if .entry or .comment are already defined in your css simply add this line to them:

    margin-left: 100px;

    or this line:

    margin: 0 0 0 100px;

    you can ofcourse change the 100px into any value you like.
    i hope this solves your issue.

Viewing 15 replies - 16 through 30 (of 34 total)