• Hi, I’ve seen on some blogs that I’ve visited where they have a section on their sidebar that says, “Number of posts since you last logged on” and then gives the actual number of new entries. Ditto for comments. Is this done through a plugin or can someone show me how to do this for my site? Thanks.

Viewing 7 replies - 16 through 22 (of 22 total)
  • Either way, the code that needs to go in <head> is still the same.

    do you have MSN or can you contact me

    This is as good a place as any, and there’s the possibility that others can help here as well.

    The header is located in the index.php file.

    My guess is that you would modify wherever the <head> is then.

    Add some code to show the number of new posts and comments since your last visit

    You would put that wherever you want the “2 new posts and 13 new comments since your last visit” to show up, so it’s up to your where to put it based on your design. In the sidebar, at the top of the page, it’s your call.

    And what the heck does step #8 mean?

    Step 8 is for displaying an image instead of the text “NEW” next to new comments and posts.

    Thread Starter yung_chi_lee

    (@yung_chi_lee)

    Oh man, this is just not working. : (

    Does anyone want to give a crack at this for me???

    Thread Starter yung_chi_lee

    (@yung_chi_lee)

    bump

    Thread Starter yung_chi_lee

    (@yung_chi_lee)

    anyone? : (

    I actually just got this working on my site. I was seeing similar errors that have been reported in other threads, so I decided to try to do things a little differently and I was able to get it to work.

    Now, I don’t use the full features of this plugin, I just wanted the “X new posts and X new comments” banner, not any of the images or text next to posts or comments, etc.

    Also, I’m using the default Kubrick theme (though heavily modified).

    In my header.php, I have this:

    <code><?php wp_head(); ?>
    <?php if (function_exists('ak_last_visit')) : ?>
    <?php echo '<script type="text/javascript" src="'; ?><?php bloginfo('siteurl'); ?><?php echo '/wp-content/plugins/wp-last-visit.php?type=js"></script>'; ?>
    <?php endif; ?>
    </head>

    The first and last lines of code above are simply to show the placement of my plugin code.

    In my sidebar.php where I want the information to show up, I have this:

    <code><?php if (function_exists('ak_last_visit')) : ?>
    <li><h2>Welcome Back</h2>
    <ul>
    <script type="text/javascript">slvBanner();</script>
    </ul>
    </li>
    <?php endif; ?>

    The “if (function_exists())” removes the extraneous code (h2, ul, li) from showing on my site if I deactivate the plugin.

    I hope this helps!

    Ugh. I fussed with the < code > tags on my post above for so long that I a couple of them stuck. In the above code examples, everything is correct except for the 2 < code >’s, so just omit them.

    Sorry about that.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Is there a plugin for this?’ is closed to new replies.