digitalminds
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Multiple loops avoiding duplicate postsMany thanks you guys! It’s working. For other people, the code is as following:
<?php get_header(); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php query_posts('showposts=1'); ?> <?php $posts = get_posts('numberposts=1&offset=0'); foreach ($posts as $post) : start_wp(); ?> <?php static $count1 = 0; if ($count1 == "1") { break; } else { ?> <?php the_title(); ?> <?php the_excerpt(); ?> <?php $count1++; } ?> <?php endforeach; ?> <div id="leftpost"> <?php query_posts('showposts=1'); ?> <?php $posts = get_posts('numberposts=1&offset=1'); foreach ($posts as $post) : start_wp(); ?> <?php static $count2 = 0; if ($count2 == "1") { break; } else { ?> <?php the_title(); ?> <?php the_excerpt(); ?> <?php $count2++; } ?> </div> <?php endforeach; ?> <div id="rightpost"> <?php query_posts('showposts=1'); ?> <?php $posts = get_posts('numberposts=1&offset=2'); foreach ($posts as $post) : start_wp(); ?> <?php static $count3 = 0; if ($count3 == "1") { break; } else { ?> <?php the_title(); ?> <?php the_excerpt(); ?> <?php $count3++; } ?> </div> <?php endforeach; ?> <ul> <?php query_posts('showposts=7'); ?> <?php $posts = get_posts('numberposts=7&offset=3'); foreach ($posts as $post) : start_wp(); ?> <?php static $count4 = 0; if ($count4 == "7") { break; } else { ?> <li><a class="" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php $count4++; } ?> <?php endforeach; ?> </ul> <?php endwhile; ?> <?php else : ?> <h2><?php _e('The page you<code>re looking for doesn</code>t exist', 'blank'); ?></h2> <div class="search-404"> <?php _e('Do you want to search for it?', 'blank'); ?><br /> <?php include (TEMPLATEPATH . "/searchform.php"); ?> </div> <?php endif; ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
Forum: Fixing WordPress
In reply to: Post Excerpts on a PageHi csander could you please share the code with us that you’ve used to get the post excerpts show on the page?
Forum: Requests and Feedback
In reply to: Display Custom Fields posts on static page<?php # Here starts Mini Loop trick: You can use this code, but _at your own risk_ # If you want to improve this code, you're welcome ;) $how_many=8; //How many posts do you want to show ?> <ul id="news"> <?php $news=$wpdb->get_results("SELECT ID,post_title FROM $wpdb->posts WHERE <code>post_type</code>=\"post\" AND <code>post_status</code>= \"publish\" ORDER BY <code>post_date</code> DESC LIMIT $how_many"); foreach($news as $np){ printf ("<li><a href=\"index.php?p=%s\">%s</a></li>", $np->ID,$np->post_title); } ?>
Forum: Requests and Feedback
In reply to: Display Custom Fields posts on static pageSorry Michael but I don’t see the connection between my problem and your links. I’ve already the titles of the posts now I also want to display the value of a custom field but it doesn’t work with the examples mentioned in the codex using_custom_fields
Forum: Plugins
In reply to: [Plugin] One post some titles on homepageIt seems not to work. When I place the code above in the index.php file nothing is changed at my homepage but my full-post page doesn’t work anymore. So I thought it was code to place the code in the home.php file, but then my homepage doesn’t work anymore. Can someone help me?
Forum: Fixing WordPress
In reply to: Strange link problem with categories and commentsSomeone that can help me with this strange problem?
Forum: Fixing WordPress
In reply to: Strange link problem with categories and commentsWhen I look at the source code of my website https://www.nextfacts.nl is the generated source correct. So I dont understand why the category and comment of the first post on a page dont get a link.
Forum: Plugins
In reply to: Rating plugin@ GamerZ, Sounds nice! I haven’t found another Rating plugin that’s so complet that WP-Postratings, so I’m exited! What’s the expected date of launch of the new version, so I can use it in my brand new project??