Support » Fixing WordPress » Problems with tags / slugs returning 1 instead of correct string

  • Hi,

    I have a large site with many tags. I use the get_the_tags() function and sometimes weird things happen to the data returned, in some cases i get 1 rather than the tag name or slug. EG see below the array returned has put the number 1 instead of the name for slug FTSE and 1 for name instead for slug indices and others? What is happening….
    Sometimes its the other way around the 1 appears in slug rather than name…

    Array ( [0] => WP_Term Object ( [term_id] => 1679 [name] => 1 [slug] => FTSE [term_group] => 0 [term_taxonomy_id] => 1679 [taxonomy] => post_tag [description] => [parent] => 0 [count] => 3 [filter] => raw )[1] => WP_Term Object ( [term_id] => 615 [name] => 1 [slug] => indices [term_group] => 0 [term_taxonomy_id] => 615 [taxonomy] => post_tag [description] => [parent] => 0 [count] => 37 [filter] => raw )[2] => WP_Term Object ( [term_id] => 3475 [name] => 1 [slug] => Live-Chart [term_group] => 0 [term_taxonomy_id] => 3475 [taxonomy] => post_tag [description] => [parent] => 0 [count] => 2303 [filter] => raw ))

  • The topic ‘Problems with tags / slugs returning 1 instead of correct string’ is closed to new replies.