Forum Replies Created

Viewing 15 replies - 16 through 30 (of 31 total)
  • I’ve been trying something for IE as well. Maybe I’m thinking too simple, but with jQuery you can store the value of the clicked link. All that needs to happen after that is to update the url adress bar with that stored value.

    jQuery('a').on('click', function(){
        var hash = jQuery(this).attr('href');
        window.location = hash;
    });

    If you put that in ajax-page-loader.js right above

    if (AAPL_warnings == true) {
    					alert("BROWSER COMPATIBILITY: \n'pushState' method not supported in this browser, sorry about that!");

    it kinda works. But for some reason only after a double click…so something is still missing…

    I would be interested in something like this as well.

    Hmm…I’m trying this, and it kind of works. The original post however gets duplicated multiple times in the related posts section. Even if I limit it to only display 1 post. Any idea’s what could cause this?

    Thread Starter Dinho78

    (@dinho78)

    Oke, I seem to have kind off fixed it. Both hacks used wp_set_post_tags, removing references to it in TweetImport makes Auto-tag work!

    Lost the ability though to autotag hashtags by removing it. But I will make that feature suggustion in a new thread.

    Forum: Plugins
    In reply to: Limit tags by date
    Thread Starter Dinho78

    (@dinho78)

    Giving this another shot. Since I just found out WordPress.com uses the plugin I need,

    https://en.wordpress.com/tags/ -> “This is a peek into what people on WordPress.com are talking about this very instant. It only includes recent activity, so it should change quite a bit over time. Click on any word to see the most recent posts under each tag or category.”

    Anyone knows of something like for a non – hosted WordPress??

    Thread Starter Dinho78

    (@dinho78)

    Bumpsy,

    Any idea what could cause this?

    Thread Starter Dinho78

    (@dinho78)

    Thanks for your reply.

    Indeed if I edit the post and update it, tags are added. So the tagging seems to work, just not when the posts get imported…

    Thread Starter Dinho78

    (@dinho78)

    Just tested 0.4.3 by removing the values for ‘remove tags’, but doing that unfortunately returned the error from the first post in this topic.

    Forum: Plugins
    In reply to: Limit tags by date
    Thread Starter Dinho78

    (@dinho78)

    I indeed meant the number of times a tag has been mentioned in recent posts. Kind of like the ‘trending topics’ on Twitter.

    I now have your code which gives tags for recent posts, but I can’t sort it by count. I found an old code to display the most popular tags in a dropdown by count, where I can’t filter it to the most recent posts and lastly I have the mod recent tags (https://www.ads-software.com/extend/plugins/wp-recent-tags/) which does best what I want, but it stopped working after a day, which isn’t weird considering it was written for an old version of WordPress.

    I just can’t believe no one has a need for a ‘most popular tags of the day/week/month’ thingie.

    Forum: Plugins
    In reply to: Limit tags by date
    Thread Starter Dinho78

    (@dinho78)

    Thanks Michael, that worked beautifully. Any suggestions for my other questions?

    However it itways seems to display by most recent as opposed to by most (count). And would it be possible the display the countnumber as well? To summarize ; what I’m trying to achieve is something like this:

    Most popular tags of today
    – Obama (18 mentions)
    – New York (15 mentions)
    – Iron Man (11 mentions)
    – Robin Hood (7 mentions)
    – MichaelH (5 mentions)

    Thread Starter Dinho78

    (@dinho78)

    Don’t know honestly. But if you can think of one word that you don’t want to show up, you can add that one.

    Thread Starter Dinho78

    (@dinho78)

    From googling around I found out that it happened because I left the ‘remove tags’ section empty. Adding some values there removed the error.

    Any suggestions for my other question? (Would it be possible to automatically add a # to all tags when they get tagged?)

    Forum: Plugins
    In reply to: Limit tags by date
    Thread Starter Dinho78

    (@dinho78)

    Oke, I think I’m getting closer…
    Now I have

    <?php
    // get 20 latest posts, display the tags used on those posts
    $tag_array = array();
    $args=array(
      'post_type' => 'post',
      'post_status' => 'publish',
      'posts_per_page' => -1,
      'caller_get_posts'=> 1
      );
    
      $my_query = null;
    $my_query = new WP_Query($args);
      $mylimit=1 * 14400; // 35 days * seconds per day - modified this to last 4 hours
      while ($my_query->have_posts()) : $my_query->the_post();
        $post_age = date('U') - mysql2date('U', $post->post_date_gmt);
        if ($post_age < $mylimit) {
          $tag_args=array('orderby' => 'count');
          $tags = wp_get_post_terms( $post->ID , 'post_tag', $tag_args);
          foreach($tags as $tag) {
            $tag_array[$tag->term_id] = $tag->term_id;
          }
        }
      endwhile;
    if ($tag_array) {
      echo 'most popular tags of the last hours';
      foreach($tag_array as $post_tag) {
        $tag = get_term_by('ID',$post_tag, 'post_tag');
    echo '<ul><li>';
    echo '<a href="' . esc_attr(get_term_link($tag, 'category')) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a> ';
    echo '</li></ul>';
      }
    }
    wp_reset_query();  // Restore global post data stomped by the_post().
    ?>

    However it itways seems to display by most recent as opposed to by most (count). And would it be possible the display the countnumber as well? And lastly, I can’t seem to modify the taglink, it links to a category (that doesn’t exist). To summarize ; what I’m trying to achieve is something like this:

    Most popular tags of today
    – Obama (18 mentions)
    – New York (15 mentions)
    – Iron Man (11 mentions)
    – Robin Hood (7 mentions)
    – MichaelH (5 mentions)

    Sorry to bother you this much.

    Forum: Plugins
    In reply to: Limit tags by date
    Thread Starter Dinho78

    (@dinho78)

    Hmm…been trying all day, but I can’t make it work. For some reason it only displays 4 tags (while there are 100’s of tags). Can you point me in the right direction?

    On a sidenote, orderby ‘count’ doesn’t seem to work and the tags link to a category instead of the tags itself. Your help is appreciated!

    <?php
    $week = date('W');
    $year = date('Y');
    $recent = query_posts('year=' . $year .'&w=' .$week );
    // get most popular tags for this week (limit by 25)
    $tag_array = array();
    $args=array(
      'post_type' => 'post',
      'post_status' => 'publish',
      'posts_per_page' => '$recent',
      'caller_get_posts'=> 1
      );
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
      while ($my_query->have_posts()) : $my_query->the_post();
        $tag_args=array('orderby' => 'count');
        $tags = wp_get_post_terms( $post->ID , 'post_tag', $tag_args);
        foreach($tags as $tag) {
          $tag_array[$tag->term_id] = $tag->term_id;
        }
      endwhile;
    }
    if ($tag_array) {
      echo 'most popular this week';
      foreach($tag_array as $post_tag) {
        $tag = get_term_by('ID',$post_tag, 'post_tag');
    echo '<ul><li>';
    echo '<a href="' . esc_attr(get_term_link($tag, 'category')) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a> ';
    echo '</li></ul>';
      }
    }
    wp_reset_query();  // Restore global post data stomped by the_post().
    ?>
    Forum: Plugins
    In reply to: Limit tags by date
    Thread Starter Dinho78

    (@dinho78)

    Thanks for your reply and code Michael.

    I’ve also found https://www.ads-software.com/extend/plugins/wp-recent-tags/ which is a very old plugin, but I took the plunge and tried it, and it still works…lol.

    Is there a way to specify dates instead of the number of posts? (I’m monitoring a twitter stream and lots of post pass by…)

Viewing 15 replies - 16 through 30 (of 31 total)