CrownOfThornz
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageI am having no luck with these loops. Is it possible to offset one category at a time? Like offset category #1 by 5 and then offset category #2 by 3 and offset category #3 by 10…
Those are just examples.
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageI’ve been messing around but nothing seems to work.
I put the first loop code into where it my featured posts are showing, this happens to be in header.php.
I put the second loop code into where my latest articles are showing, where I want to not show duplicate featured posts, which is in index.php.
Nothing happens.
I may be doing it totally wrong. If you guys could look at the two codes that I pasted above maybe you could show me how to insert the loops as specified in alchymyth’s links (the codex).
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageAlchymyth,
I’ve read through the links you gave me. I’m going to give it a try and I will post my results here.
Thanks.
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageSo I put the first loop code where I want it to gather the information… then I put the second loop code where I want it to not show that information?
I will read over you links but from what I skimmed over, it seems over my head. Like I said, I am teaching myself but it’s usually trial and error kind of coding for me.
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageWhat if I want it to be automatic. It seems like I have to know the post ID’s. I only want it to offset, so it changes each time I post a new article.
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageBelow is the code for my latest articles, this is located on index.php. I want to have all posts from all categories here but with the offset of 5 for news, reviews, and featured.
<!-- Latest Articles // --> <span class="heading2"><span><?php echo $_GET['paged'] ? 'Page'.$_GET['paged'] : 'Latest Articles'; ?></span></span> <ul class="articles"> <?php while (have_posts()) : the_post(); ?> <li id="post-<?php the_ID(); ?>"> <a class="title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> <span class="pinfo"> <a class="comments" href="<?php the_permalink() ?>#comments"><?php comments_number(__('0'), __('1'), __('%')); ?> Comments</a>Posted by <?php the_author_posts_link() ?> on <?php the_date(); ?> under <span><?php the_category(', ') ?></span> </span> <?php if(get_post_meta($post->ID, "thumbnail", true)) : ?> <a href="<?php the_permalink(); ?>" class="thumb"><img src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" /></a> <?php endif; ?> <div class="post"> <?php wpn_content_limit(get_the_content(),400); ?> <a href="<?php the_permalink(); ?>">more</a>. </div> <div class="clear"></div> </li> <?php endwhile; ?> </ul> <!-- // Latest Articles -->
Here for example is the code for the news section of the main page, this code is located in functions.php
class widget_wpn_latestp extends WP_Widget { /** constructor */ function widget_wpn_latestp() { parent::WP_Widget(false, $name = 'WP Now: Latest Previews'); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); global $wpdb,$post; $latestp = new WP_Query("cat=1623,1630,1627,1624,1655,1656,1657&showposts=".$instance['limit']); ?> <!-- Latest Previews // --> <span class="heading2"><span><?php echo $instance['title']; ?></span></span> <div class="box"> <ul class="latestrp"> <?php if($latestp->have_posts()) : ?> <?php while($latestp->have_posts()) : $latestp->the_post();?> <li> <?php if(get_post_meta($post->ID, "thumbnail_small", true)) : ?> <img src="<?php echo get_post_meta($post->ID, "thumbnail_small", true); ?>" /> <?php endif; ?> <a href="<?php the_permalink(); ?>"><?php echo wpn_content_limit(get_the_title(),35); ?></a> <span>Posted Under: <?php the_category(', '); ?></span> </li> <?php endwhile; ?> <?php else: ?> <li>No posts found</li> <?Php endif; ?> </ul> </div>
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageLets say my reviews “loop” is in functions.php and my “latest articles” loop is in index.php would that work?
Or do they have to be in the same file.
I am not the best at code, I am teaching myself so 50% of this is over my head.
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageMy website is working now without the error so you guys can see what I mean.
Again, my problem is that on the front page I have 5 review post, 5 news posts, and 5 featured articles…
On that same front page I have a “latest articles” section in which I want to show and combine all posts from all categories. I can do this but then it shows the same reviews, news, and featured articles that are already on the main page.
Offsetting doesnt work because it only offsets the combined categories. I’d like to offset the reviews category by 5, the news category by 5, and the featured category by 5.
Or, if its possible, just throw in a code that says not to duplicate posts on the main page.
Am I clear when I explain this?
Forum: Fixing WordPress
In reply to: Need Help Not Duplicating Posts on Main PageAt the time of writing my website keeps getting a 500 Internal Server Error. Hopefully you guys understand my problem without checking out the website.
Forum: Fixing WordPress
In reply to: Visual Editor in 2.5That last solution that I posted will not work with 2.5 as I thought it would. It worked for me for 2.3.3 and so I thought it would work for 2.5 but I can see the structure is set up differently.
I still have no solution.
Forum: Fixing WordPress
In reply to: Visual Editor in 2.5Guys I’ve figured it out…trust me. I’ve tried every single thing and this is what worked.
So write this down for future reference!!
1. Edit /wp-includes/scriptloader.php in notepad or whatever.
2. Find “tiny_mce_gzip.php” and replace with “tiny_mce.js” reload your browser (a cache clear and/or closing and restarting it may be required also).-CrownOfThornz
YNFVGB.com
Your New Favorite Video Game Blog