• Hi, I added the WP Likes plugin which creates a “like” feature such as Facebook. However, the plugin only shows up for the full content, and not the excerpt. I use excerpts, which of course show on the front page, so in turn this plugin doesn’t show on the front page.

    Does anyone have any idea how to get this to show on the front page with excerpts? the website is https://bit.ly/7aHzqQ

    Any help would be greatly appreciated!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    For that you need to edit index.php file of your theme and find this code:

    the_content()

    Replace with:

    the_excerpt()

    Thanks,

    Shane G.

    Thread Starter mikeltc

    (@mikeltc)

    Thank you for the response Shane. I tried your suggestion and the plugin still doesn’t show up on the front-page. I have to keep excerpts because I put media in my main conent and can’t have that loading on the front page.

    I included a screenshot of my theme’s index.php file with the change highlighted. https://i40.tinypic.com/wvofvc.jpg

    Is this going to have to be a plugin hack for it to work?

    Thread Starter mikeltc

    (@mikeltc)

    In the plugin settings there is a code that you can include to call in theme template to render

    <?php if(function_exists(‘wp_likes_render_post’)) wp_likes_render_post();?>

    How could I use this code to call it in every excerpt. Sorry, I’m not very good with PHP.

    1. Don’t bump posts. It’s contrary to the forum rules and “bumps” will be deleted.

    2. Try replacing <?php the_excerpt();?> with:

    <?php if(function_exists('wp_likes_render_post')) wp_likes_render_post();
    else the_excerpt();?>

    Thread Starter mikeltc

    (@mikeltc)

    Thank you for the help and the tip esmi, I will not bump another thread in the future.

    Thread Starter mikeltc

    (@mikeltc)

    Ok, I tried that and it didn’t work, so I tried messing with the code a bit as you can see from the link below and it strips out the excerpt completely and doesn’t display the plugin.

    https://i41.tinypic.com/fn94es.jpg

    It could be that the plugin isn’t working correctly with WP 2.9.1. Did you check whether it’s documented as being compatible with 2.9 or above?

    Thread Starter mikeltc

    (@mikeltc)

    Oh it’s completely compatible. The plugin is working just fine right now, but it’s made to display on the full content of the post, not the excerpt. I use excerpts for my site on the front page and want this plugin to display on the frontpage.

    That sounds like the plugin will only work on single post pages (ie using single.php). There’s not much you can do about that except try and contact the plugin’s developer and ask if s/he is going add an option to use the plugin on post archive (listing) pages.

    Or you could try hacking the plugin yourself if you’re up to it.

    Thread Starter mikeltc

    (@mikeltc)

    Well I got it to show up on the front page, however, the text in the excerpt itsself didn’t show up. Now if only I could get both to show up I’d be good.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Make plugins show on front-page with excerpts?’ is closed to new replies.