kamran210
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Fixing WordPress
In reply to: grouping posts under same categories on homepageSolution:
<?php //for each category, show 1 post $cat_args=array( 'orderby' => 'name', 'order' => 'ASC' ); $categories=get_categories($cat_args); foreach($categories as $category) { $args=array( 'showposts' => 5, 'category__in' => array($category->term_id), 'caller_get_posts'=>5 ); $posts=get_posts($args); if ($posts && $category->category_parent == 0) { ?> <div style="border:thick solid #0000FF; "> <?php echo 'Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> '; foreach($posts as $post) { setup_postdata($post); ?> <p> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> </a> </p> <?php } // foreach($posts ?> </div> <?php } // if ($posts } // foreach($categories ?>Forum: Fixing WordPress
In reply to: Giving Page its own Template/ WidgetsThankyou for the share . but i already read that while searching on google . i know how to make a custom search engine and added that to page using the guide on that page .
Just working on clearing the page from all other widgets .Forum: Everything else WordPress
In reply to: Seo – Assigning Subdomains To Main CategoriesThankyou 🙂
Forum: Fixing WordPress
In reply to: Help Regarding a Directory Site (urgent)Thanks WPyogi .
But i just need some guidelines . don’t want to hire someone .
Viewing 4 replies - 1 through 4 (of 4 total)