WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics Popular Posts
How to add the post thumbnail? (8 posts)

  1. Alexandre
    Member
    Posted 2 years ago #

    Hi,

    Love your plugin, it's exactly what I was looking for! I have already customized the CSS and I want to add the post thumbnail to the left of the post title.

    How do I achieve this with your plugin?

    Thanks!

    http://wordpress.org/extend/plugins/google-analytics-popular-posts/

  2. koichiyaima
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    The current version can not display a thumbnail.
    I would like to support in future versions.
    Thank you.

  3. Alexandre
    Member
    Posted 2 years ago #

    Hey,

    I did it myself. Here's the code

    google-analytics-popular-posts:378

    $titleStr = get_the_title($getPostID);
          $post = get_post($getPostID);
          $thumb = "";
          if(function_exists("woo_get_image_html")) {
            $thumb = woo_get_image_html('image',48,48,'thumbnail',90,$post->ID,'img');
          }
          $dateStr = mysql2date('Y-m-d', $post->post_date);
          $contentStr = strip_tags(mb_substr($post->post_content, 0, 60));
          $output .= '<ul>'."\n";
          $output .= '<li>'."\n";
          $output .= '<div class="popular_post"><a href='.$postPagepath.'>'.$thumb.$titleStr.'</a><br />'."\n";

    You just need to use a more standard function than the woo_get_image_html I customized. :)

    But it works pretty well for me.
    http://i55.tinypic.com/ir575g.png

  4. koichiyaima
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    Great!
    Good job!

  5. Curtis4
    Member
    Posted 2 years ago #

    oxcafe, would you be willing to help me do the same thing (for a fee)?

  6. Alexandre
    Member
    Posted 2 years ago #

    Sure Curtis! contact (@) bloguedegeek.net

  7. Curtis4
    Member
    Posted 2 years ago #

    Just checking, did you get my email?

  8. Alexandre
    Member
    Posted 2 years ago #

    Yup, replying at the moment.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic