petitpoulain
Forum Replies Created
Viewing 7 replies - 1 through 7 (of 7 total)
-
Forum: Everything else WordPress
In reply to: Integrating WordPress users to OScommercei want to do that too
Forum: Themes and Templates
In reply to: get_posts call only returning first post date?i had the same problem. But its easy to solve. Just call the function setup_postdata just after you foreach.
Change to this
<ul> <?php $myposts = get_posts('numberposts=6&category=1'); foreach($myposts as $post) : setup_postdata($post); ?> <li><?php the_date(); ?> <a href="<?php the_permalink(); ?>" title="<?php the_excerpt(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> <li> </li> </ul>Forum: Fixing WordPress
In reply to: In category and get_posts(offset=X)hellooo ^^
Forum: Fixing WordPress
In reply to: In category and get_posts(offset=X)anybody?
Forum: Fixing WordPress
In reply to: Comment Count – Need to get commenter e-mail, but how?thanks 😉
just as i post i noticied… XD
if i had posted before would be a lot easier.Forum: Fixing WordPress
In reply to: In_category inside mini loopthanks blepoxp.
so simple and WORKED!^^
Forum: Fixing WordPress
In reply to: In_category inside mini loopNot solved yet, but this topic helped me with the permalink. Now its inside the html
http://wordpress.org/support/topic/95091?replies=5I guess i need to use the custom fiel to the title too. But i read the “Using custom field” and didnt understand how to use it.
http://codex.wordpress.org/Using_Custom_FieldsHeres the code that worked with the permalink
<?php $posts = get_posts('numberposts=10&offset=1'); foreach($posts as $post) : setup_postdata($post); ?> <?php if ( in_category(5) ) { $link = get_post_custom_values('link'); $title_url = ($link) ? $link[0] : get_permalink(); echo '<a href="'.$title_url.'" ><b>'.$the_title.'</b></a>'; } else { echo 'not category 5'; } ?> <?php endforeach; ?>
Viewing 7 replies - 1 through 7 (of 7 total)