• Resolved kifebear

    (@kifebear)


    Here is my blog
    https://www.liveministriesonline.org/blog/

    Currently the posts are just added to the main page as well as stored in their categories on the left hand side. What I would like it to do is make the main page have the categories listed. So people don’t automatically see the latest post, they instead see a list of categories. Then I could put a pic or something above the listed categories. So in short, I would like the category list that is on the left hand side to move to the middle section replacing the listed posts.

    Is this possible? How do I do it?

    Thank you so much for your help!! I appreciate it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You would have to delete The Loop from your theme’s index.php file, and put the template tag, wp_list_categories(), in place of The Loop.

    Other resources:
    Stepping into Templates
    Template Hierarchy
    Stepping into Template Tags
    Editing Files

    Thread Starter kifebear

    (@kifebear)

    I am very new at this…so I want to make sure I do this right.

    This is what My whole code looks like:

    <?php
    get_header();
    ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post">
    	 <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    	<div class="meta"><?php the_time('F jS, Y') ?> <?php edit_post_link('Edit','|',''); ?></div>
    
    	<div class="storycontent">
    		<?php the_content(__('(more...)')); ?>
    	</div>
    
    	<div class="feedback">
                <?php wp_link_pages(); ?>
    			<?php _e("Posted by"); ?> <?php the_author() ?>  |
                <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    	</div>
    
    	<!--
    	<?php trackback_rdf(); ?>
    	-->
    
    </div>
    
    <?php comments_template(); // Get wp-comments.php template ?>
    
    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    
    <?php endif; ?>
    
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    
    <?php get_footer(); ?>

    And I need to take out the

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    and put in

    <?php bloginfo('description'); ?> and/or <?php wp_list_categories('arguments'); ?>?

    So it should look like this

    <?php
    get_header();
    ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php wp_list_categories('arguments'); ?>
    
    <div class="post">
    	 <h3 class="storytitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    	<div class="meta"><?php the_time('F jS, Y') ?> <?php edit_post_link('Edit','|',''); ?></div>
    
    	<div class="storycontent">
    		<?php the_content(__('(more...)')); ?>
    	</div>
    
    	<div class="feedback">
                <?php wp_link_pages(); ?>
    			<?php _e("Posted by"); ?> <?php the_author() ?>  |
                <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    	</div>
    
    	<!--
    	<?php trackback_rdf(); ?>
    	-->
    
    </div>
    
    <?php comments_template(); // Get wp-comments.php template ?>
    
    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    
    <?php endif; ?>
    
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    
    <?php get_footer(); ?>

    Am I on the right track? I very much appreciate your help with this. ??

    Thread Starter kifebear

    (@kifebear)

    oh i got it. ?? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Editing Main page of blog’ is closed to new replies.