Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use the 'get post' plug-in to insert the latest post in my Tutorial Category on my Blog's static front page. I use the 'more' tag to only show part of the post where appropriate but the plug-in shows the whole post which is too long. Researched and it seems the following code is what displays the post to the more tag:

<?php the_content( $more_link_text , $strip_teaser ); ?>

I think the plug-in is now unsupported and my blog is non-commercial. I can post any additional info but is anyone able to help me amend the plug-in code to incorporate this change. It feels like it should be simple but I'm sure it's not. If it helps my home page is http://www.phoneographer.org

Hi I added a block of code as suggested. It's the only code I can find containing 'the_content' but not sure whether it's the right area to be looking. The plugin has 3 files.

{
    // Register a new filter with WordPress to receive all post content
    add_filter('the_content', array($get_post_plugin, 'scan_content'));
    // Add settings page to admin menu
    add_action('admin_menu', array($get_post_plugin, 'register_admin_page'));
    add_action('admin_init', array($get_post_plugin, 'init_admin_page'));
    // Configure plugin defaults
    add_action('wp_loaded', array($get_post_plugin, 'setup_defaults'));
}
share|improve this question
It's hard to point the code to be edited without seeing your current code. Can you add some of the code which you think is showing the page – Mridul Aggarwal Nov 8 '12 at 18:18
Hi @MridulAggarwal thank you - I added some code to my question but I'm not sure whether it's the correct code or not. Maybe it signposts somewhere else? The plugin has 3 PHP files. – Skip Nov 8 '12 at 19:55
this should explain why the full content is showing codex.wordpress.org/… - you possibly need to hack the plugin code to add the necessary line. – Michael Nov 8 '12 at 20:17
add_filter('the_content', array($get_post_plugin, 'scan_content')); this is the line adding the filter. You can put // immediately before this line to make it a comment or just delete this line. – Mridul Aggarwal Nov 8 '12 at 20:49
Thank you all for taking a look at this for me. I think the tweak is just a little too complicated for me to understand (I give most things a try - I think the line needs editing rather than commenting out). Please accept my thanks for your input - you're all really kind for helping. – Skip Nov 8 '12 at 20:58

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.