raptrex
Forum Replies Created
-
haha i fixed it
<?php query_posts($query_string . "&cat=-4"); ?>okay this shows 10 posts from all categories but category 4, however, now pagination does not work
<?php query_posts('cat=-4&posts_per_page=10'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php /** change '4' to the category number of your Article/blog section */ ?> <?php /** this gets the url from the custom field called 'url' */ ?> <?php $url = get_post_meta($post->ID, 'url', true); ?> <li> <a href="<?php echo $url; ?>" rel="bookmark" target="_blank" title="<?php the_title(); ?>"> <?php echo get_post_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&w=150&h=150&src='); ?></a> <h3><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3> </li> <?php endwhile; ?> <?php else : ?>bumb, I still have not figured this out
Forum: Your WordPress
In reply to: New portfolio, tell me what you think!I love it, could you tell us how you got the buttons to sort your post/pages by category
Forum: Plugins
In reply to: help with in_categorylol nevermind i was missing a } in front of the else
Forum: Plugins
In reply to: help with this codelol anyone else that can help? so far only azaozz, whom i appreciate for replying, has helped
Forum: Plugins
In reply to: help with this codenope, all of my posts are in a single category
Forum: Plugins
In reply to: help with this codeif i add endforeach; before each endif, i get this error
Parse error: parse error, unexpected T_ENDFOREACH in C:\xampplite\htdocs\wordpress\wp-content\themes\mag\index.php on line 35
with line 35 and each other line with causing this error being
<?php endforeach;endif; ?>then i tried using the curly brackets
<?php foreach( $posts as $num => $post ) { setup_postdata($post); if ( $num == 0 ) {// this is the first post ?>taking out the colon “:”
i got an error with line 34
endforeach;
that i had previously so i deleted that
and this just messed everything up…Forum: Plugins
In reply to: help with this codelol just made another category “6”
so i replaced 1 with 6now it shows 6,6,4
when its suppose to be 6,4,3oh and im doing this on my computer, not on a server
Forum: Plugins
In reply to: help with this codethx azaozz
it worked until i started adding more stuff and postsnow my categories are not in order in the <h2> part such as here
<h2><?php the_category(', '); ?> »</h2>its suppost to show categories 1,4,3 in that order
but it shows 3,1,4
the posts show up fine in its correct categories
just this h2 part is out of ordermy latest code
http://paste.uni.cc/17998all of my posts are in a single category, none are in both 3 and 4 or anything like that
Forum: Plugins
In reply to: help with this codealright testing the code out and got some problems
the_content doesnt show anything, just a </p> with no <p>next the “url” or second category only shows the latest post in pright and none of the others
pright works fine for the first category chatheres my index.php
http://paste.uni.cc/17957Forum: Your WordPress
In reply to: My Sketchbook / Art Blogwat program u use to draw?
Forum: Plugins
In reply to: help with this codethx for the reply
this is what you meant right?
http://paste.uni.cc/17955ill test it when i get home
Forum: Plugins
In reply to: help with this codehere it is on pastbin
http://paste.uni.cc/17953Forum: Developing with WordPress
In reply to: custom loop help<?php $posts = get_posts( "category=2&numberposts=3" ); ?>
<?php if( $posts ) : ?><div class="post" id="modernScience">
<h2>Modern Science</h2>
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<div class="pleft">
<h3 class="entry-title">" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></h3>
<div class="entry-content">
<?php the_content("<span class=\"continue\">" . __('Continue reading','') . " '" . the_title('', '', false) . "'</span>"); ?>
</div>
</div>
<div class="pright"></div>
<?php endforeach; ?></div>
<?php endif; ?>
<?php $posts = get_posts( "category=3&numberposts=3" ); ?>
<?php if( $posts ) : ?><div class="post" id="lifestyle">
<h2>Lifestyle</h2>-
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<div class="pleft">
<h3 class="entry-title">" title="<?php printf(__('Permalink to %s'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark"><?php the_title() ?></h3>
<div class="entry-content">
<?php the_content("<span class=\"continue\">" . __('Continue reading','') . " '" . the_title('', '', false) . "'</span>"); ?>
</div>
</div>
<div class="pright"></div>
<?php endforeach; ?></div>
<?php endif; ?>
so this is what i have so far
but how do i make the latest post be in “pleft” and the next 5 in “pright”?