Forum Replies Created

Viewing 15 replies - 46 through 60 (of 63 total)
  • Thread Starter nyckidd

    (@nyckidd)

    thanks but i get some syntax error when i use the sample code

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    Thread Starter nyckidd

    (@nyckidd)

    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;
    }
    Thread Starter nyckidd

    (@nyckidd)

    thanks bro…nice theme…i got you

    Thread Starter nyckidd

    (@nyckidd)

    thanks 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 ??

    Thread Starter nyckidd

    (@nyckidd)

    where do i place that in my code ?

    Thread Starter nyckidd

    (@nyckidd)

    uh-oh!!

    everything is working like a charm…..quick question how do i randomize articles from a specific category on the homepage ?

    Thread Starter nyckidd

    (@nyckidd)

    oh yeah and thanks to Ms Theme Diva esmi ?? for the introductory link ??

    Thread Starter nyckidd

    (@nyckidd)

    worked like a charm…thanks chinmoy29 ??

    Thread Starter nyckidd

    (@nyckidd)

    i think i got it….i just added your css to the id post

    Thread Starter nyckidd

    (@nyckidd)

    thanks 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>
    Thread Starter nyckidd

    (@nyckidd)

    Thanks 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 B

    but i would like them to be like

    article A | article B

    any piointers ?

    Thread Starter nyckidd

    (@nyckidd)

    Am 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;
    ?>
    Thread Starter nyckidd

    (@nyckidd)

    well…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

    Thread Starter nyckidd

    (@nyckidd)

    Well 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;
    ?>
    Thread Starter nyckidd

    (@nyckidd)

    ok 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; ?>
Viewing 15 replies - 46 through 60 (of 63 total)