1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Will pay $10 for a simple wordpress code modification

Discussion in 'Content Management' started by TransPersonal, Aug 27, 2009.

Thread Status:
Not open for further replies.
  1. #1
    Hi,

    I will pay 10 dollars via paypal to any one who can do this simple job. Anyone who knows PHP and is familiar with WordPress should be able to do this in a couple of minutes. Note: if you want to be paid before releasing the code you must prove that it works on your own WordPress installation.

    The task:

    In a standard WordPress tag cloud only the tags are shown. The number of posts under each tag is not shown. So I got someone to write this code for me that achieves this:


    <?php
        $query_string = '
    		SELECT *,name FROM '.$wpdb->prefix.'term_taxonomy
    		JOIN '.$wpdb->prefix.'terms
    		ON '.$wpdb->prefix.'term_taxonomy.term_id = '.$wpdb->prefix.'terms.term_id
    		WHERE '.$wpdb->prefix.'term_taxonomy.taxonomy = "post_tag"
    		ORDER by  '.$wpdb->prefix.'terms.name ASC
        ';
    	$post_tags = $wpdb->get_results($query_string);
    	?>
    	<div id="a" class="abc_tags">
    		<ul>
    	<?php
    	foreach($post_tags as $key => $tag) {
    		$newletter = substr($tag->name, 0, 1);
    		if($newletter !== $letter && $key != 0) { ?>
    		</ul>
    	</div>
    	<div id="<?php echo strtolower($newletter); ?>" class="abc_tags">
    		<ul>
    	<?php	} $letter = substr($tag->name, 0, 1); ?>
    			<li><a href="<?php echo get_tag_link($tag->term_id); ?>" title="<?php echo sprintf( __( "View all posts in %s" ), $tag->name ); ?>"><?php echo $tag->name.' ('.$tag->count.')';?></a></li>
    		<?php
    	}
    		?>
    		</ul>
    	</div>
    
    PHP:


    This code displays a vertical tag list listed alphabetically with the number of posts under each tag next to it. For example:

    Apple (5)
    Goat (2)
    Zebra (10)

    Problem is, this code shows every tag on my blog - I want it to show only tags under a particular letter. Like all tags starting with the letter "A":

    Apple (5)
    Ax (3)
    Azazel (1)

    So that's the job, to modify this code so that it only shows tags from a particular letter alphabetically with the number of posts applied to the tag next to it. Please do not post any solutions on this thread. Email me if you are interested:

     
    TransPersonal, Aug 27, 2009 IP
  2. TransPersonal

    TransPersonal Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To the mods:

    Please delete this thread. I have re-posted it in the proper PHP section.
     
    TransPersonal, Aug 29, 2009 IP
  3. TransPersonal

    TransPersonal Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This offer is no longer valid, the job has been done,

    Thanks.
     
    TransPersonal, Aug 29, 2009 IP
Thread Status:
Not open for further replies.