Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter JPBigot

    (@jpbigot)

    Hi,

    I’ve resolved as taht by replacing the line 131 of hashtager.php :

    wp_set_post_tags( $postid, $this->get_hashtags_from_content( $content ), $this->settings[‘advanced_nodelete’] );

    by these lines :

    $liste_hashtags = $this->get_hashtags_from_content( $content ) ;
    wp_set_post_terms( $postid, $liste_hashtags, ‘ad_tag’, $this->settings[‘advanced_nodelete’] );
    $liste_hashtags_sql = “‘”.str_replace( “, ” , “‘,'” , $liste_hashtags ).”‘” ;
    global $wpdb;
    $sql = $wpdb->prepare(
    “UPDATE wp_terms SET name = CONCAT (‘#’, name ) WHERE SUBSTR(name, 1, 1) <> ‘#’ AND slug IN ( “.$liste_hashtags_sql.”) “, ” ) ;
    $wpdb->query($sql);

    Thx,

    JPB

    hashtagger is designed to use the WordPress tag system. That’s why your change will not make it into a future version. The Plugin is Open Source, so feel free to change it to fit your needs.

    But you maybe should rename it to prevent it from being updated…

    Peter

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to keep the "#" in the tag name ?’ is closed to new replies.