hungzai
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Help: Writers ListWhat is the ID is dynamic which means I want to display these sets of latest posts beside an author’s posts?
Forum: Fixing WordPress
In reply to: How to OFFSET posts in index.php?Thanks. For those who are keen, just add this
query_posts(‘offset=5’);
before the IF statement.
Cheers.
Forum: Fixing WordPress
In reply to: Chinese characters can’t be displayed in wordpress 2.8I had actually migrated my blog and all the posts that has chinese characters need to be redo. Deleting that 2 lines work. It’s my post that fcuked upon the migrating.
Forum: Fixing WordPress
In reply to: Automatically return to new ‘Add Post’ page after published a post.For those who are keen, here is the solution http://wordpress.org/support/topic/233181?replies=9
Forum: Fixing WordPress
In reply to: Redirect after post madeThanks! This is what I need!
Forum: Fixing WordPress
In reply to: How to exclude current post when listing random posts in single.phpYes!!!!! Lovely!!!! Thanks!!!
Forum: Fixing WordPress
In reply to: How to exclude current post when listing random posts in single.phphttp://wordpress.pastebin.com/d24ed2c43
Maybe you’ll like to know how do I know it didn’t work.
Because the category I test out on has only 4 posts and when I gone test one of those post, it still display 4 related posts which also include that current posts.
Forum: Fixing WordPress
In reply to: How to exclude current post when listing random posts in single.phphmmm Didn’t work…….anything else I need to add to capture the ID? Or it’ll just GET-THE-ID?
Forum: Fixing WordPress
In reply to: How to exclude current post when listing random posts in single.phphttp://wordpress.org/support/topic/206936?replies=2
This was what I used but it turned out one misses instead of excluding…..
Forum: Fixing WordPress
In reply to: How to exclude current post when listing random posts in single.phpthanks and here you go
if ( in_category(‘373’) ):
$recent = new WP_Query(“cat=373&showposts=3&orderby=rand”); while($recent->have_posts()) : $recent->the_post();
title
endwhile;
else
endifI’ve tried this
http://weblogtoolscollection.com/archives/2008/05/17/how-to-avoid-duplicate-posts/
but it didnt work.
I tried another one which uses some array thingy but and it worked but however it did not really exclude but merely print nothing so my 3 random posts becomes 2. The thing is I’m displaying pictures in static position so when it’s done that way, the space is blank which isn’t what i want.So what i want is to really exclude it while they search for posts randomly…and give me 3 posts that is not the current post…
Forum: Fixing WordPress
In reply to: List child category if in parent categoryIt worked!!! Thanks!!!
For those who are keen, the below code works too.
foreach((get_the_category()) as $childcat) {
if (cat_is_ancestor_of(CAT_ID, $childcat)) {
echo ‘cat_ID).'”>’;
echo $childcat->cat_name . ‘‘;simple replace the CAT_ID with the parent category ID
Thanks for your help dude!
Forum: Fixing WordPress
In reply to: List child category if in parent categoryAlright thanks first. And I may need to ask you where do I put this piece of code and what do i need to put inside my single.php..
Thanks for your great help anyway.
Forum: Fixing WordPress
In reply to: List child category if in parent categoryYes, I want to list australia brazil or china…the children category of the parent category.
Say if i do a post and one of the categories is Australia..i want to list it by using
if in category country(parent)..then list australia..
can that be done?
The problem i am facing now is…
1) When i query a if in category of parent, it returns negative because the post itself was not list in the parent but child.
2) I have no idea how to list child of a parent category of a post..
Forum: Fixing WordPress
In reply to: List child category if in parent categoryOne big problem i am facing in this is that a post would not include the parent category and so when I use something like in_category..it returns negative….any experts know how to go around this?
Forum: Fixing WordPress
In reply to: Increase no of categories viewed in dashboardFor those who are keen