• Resolved dmd54

    (@dmd54)


    I’m having trouble getting my blog to show up properly. Could use some help.

    site is https://danielpaymar.com – right now the blog is it’s own page, https://danielpaymar.com/blog

    I am trying to have excerpts of posts show up on this page using the excerpt loop but it’s not working.

    <?php $excerpt = get_the_excerpt( $deprecated ) ?>

    thanks for any suggestions

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter dmd54

    (@dmd54)

    If anyone is reading this…I have partially solved the problem but still would like to know if what I want to achieve is possible.

    I made a category “blog” that is representing what I want to show up as the blog page. https://danielpaymar.com/category/blog

    basically i want to figure out how I can eliminate having to have the directory going through “category” to get to the main blog page for my site.

    Checkout https://codex.www.ads-software.com/Pages#Creating_Your_Own_Page_Templates and look at section “A Page of Posts” this should be what you are looking for.

    Thread Starter dmd54

    (@dmd54)

    I had already created a page template. I added and tweaked the code in the codex referenced “A page of posts” but it’s still not showing anything.

    Thread Starter dmd54

    (@dmd54)

    All right, I got it working but the formatting is all messed up, posts are appearing outside of the left column. Any idea why that would be?

    For what i can see there is an additional </div> that closes the left content after the first post. Can you please paste here your page template so i can check it?

    Thread Starter dmd54

    (@dmd54)

    This is the template I’m using for the blog page:

    <?php
    /*
    Template Name: category
    */
    ?>
    <?php
    get_header();
    ?>
    
    <!-- Begin #colLeft -->
    		<div id="colLeft">
    			<h1><?php the_title(); ?></h1>
    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'category_name' => 'Blog', // Change these category SLUGS to suit your use.
    	'paged' => $paged
    );
    query_posts($args);
    if( have_posts() ) :?>
    <?php while ( have_posts() ) : the_post(); ?>
    
    		<div class="postItem">
    				<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
    				<div class="meta">
    							<?php the_time('M j, Y') ?> &nbsp;&nbsp;//&nbsp;&nbsp; by <span class="author"><?php the_author_link(); ?></span> &nbsp;&nbsp;//&nbsp;&nbsp;  <?php the_category(', ') ?>  &nbsp;//&nbsp;  <?php comments_popup_link('No Comments', '1 Comment ', '% Comments'); ?>
    						</div><!-- END META -->
    
    				<?php the_excerpt() ?>
    
                        	<div class="postTags"><?php the_tags(); ?></div> <?php comments_template(); ?>
    			</div><!-- END POST TAGS -->
    
    		<?php comments_template(); ?>
    	</div><!-- END OF POST ITEM -->
    		<?php endwhile; else: ?>
    
    		<p>Sorry, but you are looking for something that isn't here.</p>
    
    	<?php endif; ?>
    
    </div><!-- END LEFT COL -->
    
    <div id="colRight"></div>
    
    <?php get_sidebar(); ?>	
    
    <?php get_footer(); ?>

    Thanks for checking it

    Try to remove this:

    </div><!-- END POST TAGS -->

    Thread Starter dmd54

    (@dmd54)

    Yeah, that did it. Thanks a lot for double checking and the help.

    cheers

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘blog excerpts help’ is closed to new replies.