WordPress.org

Ready to get started?Download WordPress

Forums

SEO SearchTerms Tagging 2
Wrong keywords ! (3 posts)

  1. dudd
    Member
    Posted 3 years ago #

    Hi,

    I use EO SearchTerms Tagging 2 v 1.52 with wordpress v3.0.5

    When i use the shortcode :

    <?php if(function_exists('stt_terms_list')) echo stt_terms_list() ;?>

    It display wrong keywords (display keywords related to another post) but if i enable to add automatic list after post content it show the right keywords !

    (excuse my little english)

  2. dudd
    Member
    Posted 3 years ago #

    edit : curious ! i use this code to display similaires post by tag :

    <?php
    //for use in the loop, list 5 post titles related to first tag on current post
    $tags = wp_get_post_tags($post->ID);
    if ($tags) {
    
      $first_tag = $tags[0]->term_id;
      $args=array(
        'tag__in' => array($first_tag),
        'post__not_in' => array($post->ID),
        'showposts'=>10,
        'caller_get_posts'=>1
       );
      $my_query = new WP_Query($args);
      if( $my_query->have_posts() ) {
      echo '<div class="lire_aussi"><h5>Articles similaires</h5><ul>';
        while ($my_query->have_posts()) : $my_query->the_post(); ?>
          <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
          <?php
        endwhile;
    	echo '</ul></div>';
      }
    
    }
    
    ?>

    so if i add the shortcode before this code it display the correct keywords, but if i add it after the code it display wrong keywords !

  3. dudd
    Member
    Posted 3 years ago #

    resolved by using this code :

    http://wordpress.pastebin.com/uKDWTwkN

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic