umesh.awasthi
Forum Replies Created
-
Forum: Plugins
In reply to: [Slickr Flickr] Fatal error: Class 'Genesis_Club_Utils' not foundYeah,
I checked it and reverted back to old build ??Problem resolved.i was not aware of the proper word-press architecture. I removed the
<?php wp_footer() ?>
from my footer.php which was causing the problemForum: Fixing WordPress
In reply to: Showing author box on post pagejust to edit i have added following code
<?php $category_ids = remove_element(get_all_category_ids(),'274'); if (in_category($category_ids)) { ?>
this code is not working but if i pass a single category id to
in_category()
function like<?php if (in_category('8')) { ?>
if block is working fine.i am clueless what is going wrong Thanks in advance
Forum: Everything else WordPress
In reply to: WordPress get_posts() returning same post all the timei tried this code
<?php $args1 = array( 'numberposts' => 12 ,'orderby' => 'rand'); global $post; //save the current post $temp=$post; $rand_posts1 = get_posts( $args1); foreach( $rand_posts1 as $post ) ://yes this is required, we need $post in setup_postdata setup_postdata($post); ?> <?php the_title(); ?> <?php endforeach; $post=$temp;//restore current page ?>
it worked smoothly.
Forum: Everything else WordPress
In reply to: WordPress get_posts() returning same post all the timeThanks for the quick reply and it helped me a lot.
i have to fetch 12 posts so that i can display them in template so is there any way to fetch 12 unique random posts in word-press with help of any query?Forum: Everything else WordPress
In reply to: WordPress get_posts() returning same post all the timeThanks for the reply.as new to the platform i even tried this code of piece
<?php args1 = array( 'numberposts' => 12 ,'orderby' => 'rand', 'category' => '7,8'); $rand_posts1 = get_posts( $args1); foreach( $rand_posts1 as $randpost1 ) : ?> <?php the_title(); ?> <?php endforeach; ?>
even specifying the category its still showing the same post the latest one in the blog all 12 times