hungzai
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Sorting template files by alphabetically orderIT WORKED! THANKS!
Forum: Fixing WordPress
In reply to: Show only posts from particular categoryGo into a loop which will look something like this. You can add any other information in the loop such as date or content or author info.
$recent = new WP_Query(“cat=YOUR-CATEGORY-ID-HERE&showposts=NUMBER-OF-POST-HERE”); while($recent->have_posts()) : $recent->the_post()
” rel=”bookmark”><?php the_title(); ?>
php endwhile
Forum: Fixing WordPress
In reply to: Online users counter plugin?1) wp-online
1) wassupForum: Fixing WordPress
In reply to: How to count for posts in 2 categories?Hi thanks for your reply. But it doesn’t work on my side, produced nothing.
Forum: Plugins
In reply to: theme switching only for registered usersIf you loop it up, then the switcher won’t be visible to not registered user.
if ($user_ID) :
theme switcher
else :
do not display.
endif;
Forum: Fixing WordPress
In reply to: Counting posts within categoriesDear spstieng,
Your description of the code is exactly what I’m looking for. But I have 1 question though, how do we use the code? If I want to count posts that belong to cat A and cat B, where do I input the catID in the above code? Thanks for your help!
Forum: Themes and Templates
In reply to: Category post count as a linkphp global $post;
$myposts = get_posts(‘numberposts=1&offset=0&category=25’);
foreach($myposts as $post) : setup_postdata($post);
function the_category_link( $cat_id ){$o = wp_cache_get( $cat_id, ‘category’ );
print $o->count; }
YOUR CATEGORY NAME
php the_category_link(25);
php endforeach;Forum: Fixing WordPress
In reply to: How to display search keyword in search results?Cheers mate.
Thanks a lot.
Forum: Fixing WordPress
In reply to: Random Post from a Specific Category not working in 2.6This works for me.
Forum: Fixing WordPress
In reply to: Random Post from a Specific Category not working in 2.6Exactly. This doesn’t work in 2.6 anymore! I kinda regret upgraded it!
*Update
This works for me.
http://wordpress.org/support/topic/195539?replies=3Forum: Fixing WordPress
In reply to: Registered users can’t retrieve password.Plugin WPDIS causing it. Cheers.
Forum: Plugins
In reply to: Is there a “Please wait” redirect plugin?Found the solution. When your page is loaded, another window(your advertisement will appear and the time delayed can be set. Once it finishes counting, the window disappears.
<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
function delayer() { //DOM
if (document.getElementById){
document.getElementById(‘prepage’).style.visibility=’hidden’;
}else{
if (document.layers){ //NS4
document.prepage.visibility = ‘hidden’;
}
else { //IE4
document.all.prepage.style.visibility = ‘hidden’;
}
}
}
// End –>
</SCRIPT><body onLoad=” setTimeout(‘delayer()’, 5000) “>
<div id=”prepage” style=”position:absolute; font-family:arial; font-size:16; left:0px;
top:0px; background-color:white; layer-background-color:white; height:100%; width:100%;”>
<table width=100%><tr><td><font color=”red”>YOUR ADVERTISEMENT CODE HERE</td></tr></table>
</div></body>
Forum: Plugins
In reply to: Is there a “Please wait” redirect plugin?This works in single.php but..
<META HTTP-EQUIV=Refresh CONTENT=”3; URL=http://www.xxx.com”> </div>
The URL is suppose to be absolute, so how do we capture the URL which is suppose to be relative?
Forum: Plugins
In reply to: Is there a “Please wait” redirect plugin?I’m also looking for something like that.
Forum: Themes and Templates
In reply to: Is it possible to integrate SMF forum into a WordPress page?drewactual : I am tempted by your offer. How do i get you? Leave me a msg at i.am@hungzai.com
Jasonian : There are plenty of tutorials on how it can be done. The only problem is it normally isn;t as smooth as we read.