Forums

podPress
[Podpress] Problem With Recent Posts (2 posts)

  1. geekcastradio
    Member
    Posted 5 months ago #

    When I post a new blog post using this plug-in, it for whatever reason even after turning off the excerpt preview, it still shows the code for the audio plugin on the main site. - http://thisweekingeek.net/

    Check down after the grid and look at the Recent Posts. There is a bunch of random code there from the plugin with the blog description. I need it to just show the descript in the recent posts area and still have the player in the actual posts.

    Ideas?

    http://wordpress.org/extend/plugins/podpress/

  2. ntm
    Member
    Posted 5 months ago #

    In the home.php file of your theme you will probably find a lot of calls of the function the_content_limit(...);.
    I suggest that you replace the calls with these lines:
    e.g.
    old:

    <?php the_content_limit(350, "[Read more of this review]"); ?>

    new:

    <?php
    	$custom_excerpt_length = 30;
    
    	add_filter('excerpt_length', 'custom_excerpt_length');
    
    	the_excerpt();
    
    	remove_filter('excerpt_length', 'custom_excerpt_length');
    ?>

    If you do that will need to add this

    function custom_excerpt_length($length) {
    
        global $custom_excerpt_length;
    
        return $custom_excerpt_length;
    
    }

    to the functions.php file of your theme.

    Please note that the 350 in the old call means 350 characters and that $custom_excerpt_length = 30; means 30 words.

    This modification uses the WP functions to diplay the excerpt of a post. If a post has a custom excerpt it will show this excerpt otherwise it creates an automatic excerpt of the content.

    Regards,
    Tim

Reply

You must log in to post.

About this Plugin

About this Topic

Tags