23 reputation
6
bio website
location
age
visits member for 2 years
seen Jun 17 at 11:22

Nov
10
awarded  Popular Question
Jul
23
awarded  Tumbleweed
Jul
16
asked WP All Import - Custom Posts do not show up on website
Jan
18
comment Getting tagid from tagname
Rohit, that's quite strange. Cause I have it in my header.php, but when I don't have it in my sidebar.php it simply doesn't work... any thoughts on that?
Jan
18
comment Getting tagid from tagname
Dear Rohit Pande, I tried something different. I added: <?php global $site_domain; ?> before the code and now it works. I got it in my header aswell, any tips so I only need this code 1 time on my page? Like, why doesn't it take it from the header.php?
Jan
18
comment Getting tagid from tagname
Rohit, don't you find it strange that I can use this on 2 other locations, for the menu and for the index to show posts from a certain tag, but not for this?
Jan
18
comment Getting tagid from tagname
Rrikesh, could you give me some more code, cause I don't know how to use this.
Jan
18
comment Getting tagid from tagname
If I use the echo or the echo with print, it doesn't show anything. It is in sidebar.php, does that change anything?
Jan
18
comment Getting tagid from tagname
Rohit Pande, could you give me the exact code to echo or print_r the value of $site_domain? Then I'll put it in place.
Jan
18
comment Getting tagid from tagname
I tried this, look at the answer of Rohit Pande, but it seems it does not work, does it matter that it's in the sidebar?
Jan
18
comment Getting tagid from tagname
$site_domain returns www.website.nl but without the www. and .nl. so it returns website. Which I also have as tag for the posts for that website.
Jan
18
awarded  Commentator
Jan
18
comment Getting tagid from tagname
I'm using $site_domain throughout the website, it gives back the correct keywords for this theme as it's for my own network of websites. An example where it works is: <?php wp_nav_menu( array( 'menu' => $site_domain ) ); ?>
Jan
17
comment Getting tagid from tagname
Thanks for the edit, I came alittle further, but I am not that good with php. This is what I got so far:<br/> <?php if (function_exists('get_highest_rated')): ?> <ul><?php $tag_desc = get_term_by('name', $site_domain, 'post_tag'); ?> <?php get_highest_rated_tag(($tag_desc->term_id), 'both', 0, 10); ?> </ul> <?php endif; ?> yes I got the id by now, but I can't use $site_domain at this?: <?php $tag_desc = get_term_by('name', $site_domain, 'post_tag'); ?>
Jan
17
comment Getting tagid from tagname
I am sorry I don't understand. I don't use a certain category, I want to get it for a certain tag? The output to some variable is exactly what I want, but I don't see how I can get the tag id of $tagname by this code. Would you care to explain a bit more for me? Thanks in advance!
Jan
17
comment Getting tagid from tagname
Dear Rrikesh,Thank you for your reply. But I want it the other way around. I got the tag name in $tagname. And I want to get the ID of that tag.
Jan
17
asked Getting tagid from tagname
Jan
17
awarded  Editor
Jan
17
revised Recent comments per tagged post?
added 164 characters in body
Jan
17
answered Recent comments per tagged post?