WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] A widget to display only the latest post (6 posts)

  1. Smartflight
    Member
    Posted 3 years ago #

    I recently installed a new black theme.
    The primary disadvantage is that it does not show posts on the front page- it's more of a business blog theme. I am not just installing and using another theme because I like this one. Dark, clean and appealing. Hard to find.

    Here's the site: http://thepaperbird.co.cc

    I need a "widget/plugin" that works similar to how WordPress shows the latest posts (number definable in settings) on the home page.

    It'd have the title, then the date, time and the author below it and the category posted in along the date, time and the author.
    Then the post content.

    I think it won't be hard since the code is already there somewhere in WordPress. Someone just needs to make a plugin out of it. This is a request. I am no programmer, or anything.

  2. MichaelH
    Member
    Posted 3 years ago #

  3. Smartflight
    Member
    Posted 3 years ago #

    I appreciate your help MichaelH.
    But I dug in a little in the default wordpress theme and my new theme. I have managed to do what I wanted to do.

    From here on, I have another issue.

    The "Recent" widget takes up the left part, and the single latest post takes up the right part. There is an annoying gap between them.

    Here's the code to this part.

    <div id="home-mid" class="clearfix">
    
    			<div class="left">
    				<?php ithemes_add_widget_location( 'Home Middle Left' ); ?>
    			</div>
    
    			<div class="right">
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<h7><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></h7>
    
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
    
    				<p class="postmetadata"><h7>Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></h7></p>
    			</div>
    
    		<?php endwhile; ?>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    
    	<?php endif; ?>
    			</div><!--end right div-->
    
    		</div><!--end home-mid div-->

    Is there a way I can assign 'x' pixels to the left side, and 'y' pixels to the right side?

  4. Smartflight
    Member
    Posted 3 years ago #

    Plus, both the left and right side would be center-aligned, overall.

    Hence, if I, say assign 150px to the left side, and 350px to the right side, it'd show up at the horizontal center of the page taking up the assigned spaces.

    I hope that's clear.

  5. Smartflight
    Member
    Posted 3 years ago #

    Ok, I can't believe how easy it is to get in to the WordPress files- so organised and editor-friendly. I have some HTML knowledge, and some C++. To add on, CSS makes it marvellously easy!

    I am done here. Sure I still will be making changes, I'm not done with the entire theme.

    Also, I am not posting the solution here since it is theme-specific.

  6. MichaelH
    Member
    Posted 3 years ago #

    I am no programmer, or anything.

    Now you don't have to say that anymore. Good Work!

Topic Closed

This topic has been closed to new replies.

About this Topic