GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Wordpress question (https://gfy.com/showthread.php?t=1184787)

druid66 02-15-2016 07:59 AM

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;
}


celandina 02-15-2016 09:50 AM

You are kidding right ???:2 cents:

druid66 02-15-2016 09:52 AM

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.

druid66 02-15-2016 10:30 AM

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.

MakeMeGrrrrowl 02-15-2016 10:55 AM

Get a plugin.

EddyTheDog 02-15-2016 11:16 AM

Quote:

Originally Posted by MakeMeGrrrrowl (Post 20729769)
Get a plugin.

:2 cents::thumbsup...

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

Paz 02-16-2016 02:10 PM

Quote:

Originally Posted by MakeMeGrrrrowl (Post 20729769)
Get a plugin.

+/like that and get a butt plug.


All times are GMT -7. The time now is 01:26 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123