Wordpress question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • druid66
    Confirmed User
    • Feb 2006
    • 994

    #1

    Tech Wordpress question

    Hi Guys,
    I've tweaked my theme long ago heavily but i forgot where to edit tag cloud is it stored in functions.php?
    Single post on my site looks like this:
    Leaked photos of very cute Chinese police girl blowing her BF part 1/3 | Asian Sex

    tags are at the bottom i would like to edit tags somehow so i'll have displayed only those tags which are from current post not top 50 tags.

    this is tag cloud code i've copied from functions.php is it this code which i need to edit?

    Code:
    add_filter ( 'wp_tag_cloud', 'tag_cloud_count' );
    function tag_cloud_count( $return ) {
    $tags = explode('</a>', $return);
    $regex = "#(.*title[=]')(.*)( topic.*)#e";
    foreach( $tags as $tag ) {
    $tagn[] = preg_replace($regex, "('$1$2$3&nbsp($2&nbsp;post'.(($2!=1)?'s':'').')')", $tag );
    }
    $return = implode('</a>', $tagn);
    return $return;
    }
    Pure Japan japanese babes blog
  • celandina
    Too lazy to set a custom title
    • Jun 2006
    • 11721

    #2
    You are kidding right ???

    Comment

    • druid66
      Confirmed User
      • Feb 2006
      • 994

      #3
      not at all. i really don't remember where to edit tags code.
      year ago i've replaced standard tag code with one which displays posts count next to tag but i don't remember where was it.
      Pure Japan japanese babes blog

      Comment

      • druid66
        Confirmed User
        • Feb 2006
        • 994

        #4
        i googled and i found this piece of code:

        To get a list of only the tag IDs for a particular post:

        Code:
        global $post;
        $tag_ids = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) );
        i should insert it somewhere inside
        wp_get_post_tags() which is located in wp-includes/post.php

        is that correct?
        how to call it inside post?

        tried this one:
        <?php wp_get_post_tags( $post_id, $args ) ?>

        but effect is blank space

        ed.: ok, ive tried different code:

        <?php
        $posttags = get_the_tags();
        if ($posttags) {
        foreach($posttags as $tag) {
        echo $tag->name . ' ';
        }
        }
        ?>

        but it displays tags with no links, but i'm getting close :D

        ed2.: with this code i'm getting what i wanted

        <?php the_tags( 'Tagged with: ', ' • ', '<br />' ); ?>

        now i need to find how to add tag counts.
        Pure Japan japanese babes blog

        Comment

        • MakeMeGrrrrowl
          Grrrrrrrrr
          • Oct 2002
          • 4986

          #5
          Get a plugin.

          Comment

          • EddyTheDog
            Just Doing My Own Thing
            • Jan 2011
            • 25433

            #6
            Originally posted by MakeMeGrrrrowl
            Get a plugin.
            ...

            You are making it hard work - YUK.....

            Comment

            • Paz
              Confirmed User
              • Jun 2012
              • 457

              #7
              Originally posted by MakeMeGrrrrowl
              Get a plugin.
              +/like that and get a butt plug.

              Comment

              Working...