My Computer Back in Service

“Make Your Computer Smile Again!”

Home ~ Blog ~ About Joe ~ About MCBS ~ Contact ~ Need Help?

Want Excerpts in Recent Posts?

 Posted by Joe Hauckes

If you're new here,  You may want to Subscribe to my RSS Feed or if you prefer ... Subscribe via e-mail. Thanks for visiting!

If you have been here before, you may notice a little change in the Sidebar. In the top section for Newest Blog Posts there has been links to recent posts, but it was just the Titles. Nothing to let readers know what the posts were about other than a few words.

I have tried various ways to enhance the description but have always fallen short of what I wanted to give readers as a preview. Using a combination of 2 different plugins, I still could only come up with one excerpt for the newest post, but had to rely on the old fashioned Title for the rest of the current posts.

I finally found a plugin, SimplePie Plugin for WordPress, through the recommendation of a friend and thought I may as well try it because no combination of plugins would give me what I wanted.

It works really well, but they make it a little more complicated to get the download(s) than is necessary. When you get to the landing page, you download their .zip file, but it is only one of 2 that you need to run the php. You have to go to the “download” in the top navigation bar and download another .zip file separately in order for the plugin to work.

After unzipping both files (separately and in different folders) the one for the actual php file (simplepie_wordpress.php) is easy enough to find and upload from the 1.2.1 folder. The other file you need is the library of information to allow the whole thing to function. The file (simplepie.inc) in the 1.0.1 folder is a little more difficult to find because it is mixed in with a lot of files you don’t need for anything (unless you like to read). Once you find the .INC file, it is also easy to upload.

Then you have to create an empty folder, cache, to use as a holding place for the current information (new posts).

If they put everything you need in one download, it would be a lot simpler to install.

Once you get through the ordeal of this process, the rest is easy.

After you upload the 2 files and create the cache folder in your wp/plugin folder, activate the plugin on your WordPress Blog.

Go to the section you would like the excerpts to show and place the following code:

<?php echo SimplePieWP(’http://example.com/feed.xml’, ‘items: 5, shortdesc: 200, showdate: j M Y’); ?>

You can adjust the “items”, “shortdesc” if you would like you can even remove the date.

The output will default to an Ordered List (numbered). If your want to change it to an unordered list, you need to be comfortable with changing the Plugin php. Don’t attempt it if you don’t know what you are doing, you might break it.

Related Posts:
  • Want Post Preview Back in WordPress?
  • If you're like me and prefer having an inline Post Preview, instead of ...
  • 2 Reasons to Cross Check Browsers
  • Something that I keep running into is customers having problems with diffe...
  • How To Put AdSense Ads After A Single Post per Page
  • Do use AdSense on your Blog? Do you want to put some Ads after your posts b...

    Need Help?


    I was asked by a few readers on my Working at Home on the Internet Blog about the procedure for putting a Drop Down Menu in the Sidebar for the Categories. It seems I’m not the only one who has too many categories and not enough room to show them all.

    It is a fairly simple bit of code to add a Drop Down Menu…

    • Go to your Sidebar php
    • Locate the code <?php get_categories (); ?> or <?php wp_list_cats (); ?>
    • Replace that code with the following:
         <h2>Categories</h2> 
         <ul class=”sellLi”>
         <form action=”<?php bloginfo(’url’); ?>” method=”get”>
           <?php wp_dropdown_categories(’show_count=1&hierarchical=1&orderby=name’); ?><br />
           <input type=”submit” name=”submit” value=”View” />
           </form>
         </ul>
    • Save your Sidebar php
    • Done

    If you are using Widgets, you may need to get a plugin by Otto that allows the use of php code within a Widget! Go to his post Fun with Widgets and look for the execphp.zip file.

    Download it, unzip it, upload it to your server wp-plugins file and you will be able to use the above php code in the Widgets and you will have the same DropDown Menu you see in my Sidebar on the WAHI Blog.

    Related Posts:
  • Try The Darkside for a Better Blogging Experience
  •  I have been using the Andreas04 2.0 WordPress Theme on my Working at Home...
  • My Computer Won’t Boot but It Worked Yesterday
  • There may come a time when things are going along just fine. Everything se...
  • Want Excerpts in Recent Posts?
  • If you have been here before, you may notice a little change in the Sidebar...

    Need Help?


    newwplogo.png

    When your readers stop by on an individual post you probably would like them to read some of your other posts. But when they get to the end of your article the only thing they see is <- Previous or Next ->.

    Why not give them an idea of what your “Previous post” is by adding the Title of the Article they would be reading?

    First look in your Single Post php for your navigation class, it looks something like this:

    <p class=”pagenav”><?php previous_post(’%',’« Earlier’, ‘no’); ?> | <?php next_post(’%',’Newer »’, ‘no’); ?> </p>

    Using the same class designation (ie p class=”pagenav instead of div class=”navigation”) insert the following code:

    <div class=”navigation”>
                <span class=”alignleft”><?php next_posts_link(’& la quo ; ‘. __(’Earlier Entries’)) ?></span>
                <span class=”alignright”><?php previous_posts_link(__(’Newer Entries’).’ & ra quo ;’) ?></span>
            </div>

    Save the code and go look at the navigation links at the bottom of a post, it should give you the Titles of the “previous” and “next” posts. You may have to make some minor adjustments to get the look you want, but it should work just fine. (Be sure to remember, there are no spaces in (& ra[la] quo ; ) ;)

    If you don’t have a single post php, look for the navigation code in your Index php right after your content info.

    Related Posts:
  • Try The Darkside for a Better Blogging Experience
  •  I have been using the Andreas04 2.0 WordPress Theme on my Working at Home...
  • Want Excerpts in Recent Posts?
  • If you have been here before, you may notice a little change in the Sidebar...
  • Use Windows Live Writer for Offline Publishing
  • If you Blog, you know that most of the time spent writing a post is online....

    Need Help?


    Want Post Preview Back in WordPress?

     Posted by Joe Hauckes

    newwplogo.png

    If you’re like me and prefer having an inline Post Preview, instead of having to go through the extra step of clicking preview>> and having it open in another window. There is a little bit of code you need to add to WordPress on your Host Server.

    You have to be comfortable working in the background code of your post.php, but it is fairly simple to do. Go to the wp-admin folder on your server, find your post.php and copy & paste* the code below.

    Here’s the steps you will need to know…

    • Open up your post.php file from your wp-admin directory.
    • Navigate to approximately half way down and find the following line of code:
    • include('edit-form-advanced.php');

    •  Directly underneath that line, add the following code:
    • ?>
      <div id='preview' class='wrap'>
      <h2 id="preview-post"><?php _e('Post Preview (updated when post is saved)'); ?></h2>
      <iframe src="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" width="100%" height="600" ></iframe>
      </div>
      <?php

    • Save your changes to post.php.

    There, Done… Simple, huh?

    Now you can view a preview of the post you are working on without going through all those extra steps. (Remember, you Still have to Save and Continue Editing for viewing)

    *If Copy & Paste doesn’t work, you may need to actually TYPE the code, but it does work.

    Source: Will Lee

    Related Posts:
  • Why Copy & Paste Doesn’t Work on Some Code
  • In the post about Putting Post Preview Back the other day, I had an "*" for...
  • Offer Your Readers The Option to Print Your Posts
  • How many times have you read an article on one of your favorite Blogs and s...
  • Want Excerpts in Recent Posts?
  • If you have been here before, you may notice a little change in the Sidebar...

    Need Help?


    `