nyckidd
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: show posts from specific monththanks but i get some syntax error when i use the sample code
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
i was able to solve it…for anyone who would like to know this is what i added
/* ----------- Sidebar widget -------------*/ .ngg-widget, .ngg-widget-slideshow { overflow: hidden; margin:0pt; padding:5px 0px 0px 0pt; text-align:left; display:inline-block; width: 595px; } .ngg-widget img { border:2px solid #A9A9A9; margin:0pt 2px 2px 0px; padding:1px; }
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categoriesthanks bro…nice theme…i got you
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categoriesthanks dude / dudette i think you meant
orderby=rand
send me your email will use you for some more questions and of course a small donation ??
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categorieswhere do i place that in my code ?
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categoriesuh-oh!!
everything is working like a charm…..quick question how do i randomize articles from a specific category on the homepage ?
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categoriesoh yeah and thanks to Ms Theme Diva esmi ?? for the introductory link ??
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categoriesworked like a charm…thanks chinmoy29 ??
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categoriesi think i got it….i just added your css to the id post
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categoriesthanks this is my code…i think my post is an id not a class….hope you can point me in the right direction…
<div id="videos"> <?php $my_query = new WP_Query('category_name=videos&posts_per_page=2'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <div class="post <?php if ($counter == 1) { echo 'fl'; } else { echo 'fr'; $counter = 0; } ?>"> <div class="box-post-content"> <?php get_image('image',get_option('home_thumb_width'),get_option('home_thumb_height')); ?> <h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <p><?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?></p> </div> <p><span class="continue"><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>">Read the full story</a></span></p> <p class="posted">Posted in <?php the_category(', ') ?><span class="comments"><?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?></span></p> </div><!--/post--> <?php endwhile; ?> </div> <div id="stats"> <?php $my_query = new WP_Query('category_name=statistics&posts_per_page=2'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <div class="post <?php if ($counter == 1) { echo 'fl'; } else { echo 'fr'; $counter = 0; } ?>"> <div class="box-post-content"> <?php get_image('image',get_option('home_thumb_width'),get_option('home_thumb_height')); ?> <h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <p><?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?></p> </div> <p><span class="continue"><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>">Read the full story</a></span></p> <p class="posted">Posted in <?php the_category(', ') ?><span class="comments"><?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?></span></p> </div><!--/post--> <?php endwhile; ?> </div>
Forum: Fixing WordPress
In reply to: Add 2 rows with content from 2 categoriesThanks for the link i got it working but how do i style it so the articles are side by side ie
right now the articles sitting on each other ie
article A
article Bbut i would like them to be like
article A | article B
any piointers ?
Forum: Fixing WordPress
In reply to: Show just post with 20 charactersAm so close…i just need to know what i need to adjust in this code to enable the character limit to work..
<?php $post_id = 4; $queried_post = get_post($post_id); echo $queried_post->post_excerpt; ?> <?php $string = get_the_content(''); $newString = substr($string, 0, 100); echo $newString; ?>
Forum: Fixing WordPress
In reply to: Show just post with 20 characterswell…need some help…its pulling the content but on one page when i have this
<?php $post_id = 5; $queried_post = get_post($post_id); ?> <?php $string = get_the_content(''); $newString = substr($string, 0, 100); echo $newString; ?> <?php $post_id = 4; $queried_post = get_post($post_id); ?> <?php $string = get_the_content(''); $newString = substr($string, 0, 100); echo $newString; ?>
and instead of pulling post with id 4 its pulling the same post so if we are on post with id 4 it pulls the same post though we have specified that it should pull post with id 4 and 5
Forum: Fixing WordPress
In reply to: Show just post with 20 charactersWell i was able to figure it out…ehe!! after 3 hours ?? for anyone who needs to know here is the code i used…
<?php $post_id = 5; $queried_post = get_post($post_id); ?> <?php $string = get_the_content(''); $newString = substr($string, 0, 120); echo $newString; ?>
Forum: Fixing WordPress
In reply to: Show just post with 20 charactersok i got this code but how do i specify a specific post using its id ?
<?php //The Query To Get Posts $my_query = new WP_Query('showposts=3'); //Run the Query and Loop Through Results while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <?php $string = get_the_content(''); $newString = substr($string, 0, 20); echo $newString; ?> <?php endwhile; ?>