WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page of Posts Template, CSS Sidebar Inove Theme Busted (12 posts)

  1. 1scholar
    Member
    Posted 5 years ago #

    I've created a pages of posts template (almost), but the sidebar is under the posts area. Anyone able to clarify the CSS?

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    A link to a page demonstrating the problem would help.

  3. 1scholar
    Member
    Posted 5 years ago #

    Yeah, it would, wouldn't it. Thank you for the help.

    http://www.mealtrader.com/icd10/codes/

  4. esmi
    Forum Moderator
    Posted 5 years ago #

    You've got two #content divs which isn't helping. Personally, I'd drop the id on the second div and just go with the 'narrowcolumn' class. Then try:

    .narrowcolumn{float:left;)

  5. 1scholar
    Member
    Posted 5 years ago #

    http://www.mealtrader.com/icd10/codes/

    Good suggestion. That cleared up the breaking page, but the right nav is still under the posts instead of to the right of the posts. It just seems that a div isn't closed, but if I try to close another div it separates the content from the footer.

    Thanks again for your help.

  6. 1scholar
    Member
    Posted 5 years ago #

    I started with the code from the Page of Posts section of this page (http://codex.wordpress.org/Pages), and have been trying to get it to work but I haven't succeeded.

  7. 1scholar
    Member
    Posted 5 years ago #

    I think i got it.

  8. quietas
    Member
    Posted 5 years ago #

    What code ended up working, I too am using the inove them and I'm looking at the page of posts in the codex as well =)

  9. savage7
    Member
    Posted 5 years ago #

    I just implemented the "Page of Posts" in WP 2.8 using the iNove Theme

    Here is the original reference code:
    http://codex.wordpress.org/Pages#A_Page_of_Posts

    Here is the modified "pageofposts.php" file I created:
    (This file is saved in the iNove theme directory)

    <?php
    /*
    Template Name: PageOfPosts
    Modified for iNove Theme in WP 2.8 by Robert Savage.
    */
    get_header();
    
    $options = get_option('inove_options');
    if (function_exists('wp_list_comments'))
    {
    	add_filter('get_comments_number', 'comment_count', 0);
    }
    
    // if this is a certain page ID, then set the category to a specific category id.
    if (is_page('371') )
    {
      $cat = array(3);
    }
    elseif (is_page('373') )
    {
      $cat = array(1);
    }
    else
    {
      $cat = '';
    }
    
    $showposts = -1; // -1 shows all posts
    $do_not_show_stickies = 1; // 0 to show stickies
    $args=array(
       'category__in' => $cat,
       'showposts' => $showposts,
       'caller_get_posts' => $do_not_show_stickies,
       );
    $my_query = new WP_Query($args); 
    
    ?>
    
    	<?php if( $my_query->have_posts() ) : ?>
    
    		<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    			<?php
    			//necessary to show the tags
    			global $wp_query;
    			$wp_query->in_the_loop = true;
    			?>
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    
    				<h2><a class="title" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    				<div class="info">
    					<span class="date"><?php the_time(__('F jS, Y', 'inove')) ?></span>
    					<?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span><?php endif; ?>
    					<?php edit_post_link(__('Edit', 'inove'), '<span class="editpost">', '</span>'); ?>
    					<span class="comments"><?php comments_popup_link(__('No comments', 'inove'), __('1 comment', 'inove'), __('% comments', 'inove'), '', __('Comments off', 'inove')); ?></span>
    					<div class="fixed"></div>
    				</div>
    
    				<div class="content">
    					<?php the_content(__('Read more...', 'inove')); ?>
    					<div class="fixed"></div>
    				</div>
    
    				<div class="under">
    					<?php if ($options['categories']) : ?><span class="categories"><?php _e('Categories: ', 'inove'); ?></span><span><?php the_category(', '); ?></span><?php endif; ?>
    					<?php if ($options['tags']) : ?><span class="tags"><?php _e('Tags: ', 'inove'); ?></span><span><?php the_tags('', ', ', ''); ?></span><?php endif; ?>
    				</div>
    		    </div>
    		<?php endwhile; ?>
    
    		<div id="pagenavi">
    		<?php if(function_exists('wp_pagenavi')) : ?>
    			<?php wp_pagenavi() ?>
    		<?php else : ?>
    			<span class="newer"><?php previous_posts_link(__('Newer Entries', 'inove')); ?></span>
    			<span class="older"><?php next_posts_link(__('Older Entries', 'inove')); ?></span>
    		<?php endif; ?>
    		<div class="fixed"></div>
    	</div>	
    
    	<?php else : ?>
    
    		<div class="errorbox">
    			<?php _e('Sorry, no posts matched your criteria.', 'inove'); ?>
    		</div>
    
    	<?php endif; ?>
    
    <?php get_footer(); ?>

    You will have to modify the section below for you own implementation:

    // if this is a certain page ID, then set the category to a specific category id.
    if (is_page('371') )
    {
      $cat = array(3);
    }
    elseif (is_page('373') )
    {
      $cat = array(1);
    }
    else
    {
      $cat = '';
    }
  10. ignitionmedia
    Member
    Posted 5 years ago #

    I have used the example on the WP site for page of posts, but it doesnt add the navigation per 10 or 20 posts. it seems to be either show a certain set number or all on the one page - how does the navigation work - its in the template so i thought it would kick in?

  11. fredsnothere
    Member
    Posted 4 years ago #

    having same problem as ignitionmedia

  12. Rindy Portfolio
    Member
    Posted 4 years ago #

    having same problem as ignitionmedia. any updates on this?

Topic Closed

This topic has been closed to new replies.

About this Topic