• developdesign

    (@developdesign)


    I’m trying to show 1 post from a specific category for latest news releases and 1 sticky post below it on my site front page.

    When I have the code reverved to show a sticky post on top and 1 news post below, there are no errors and it works perfectly.

    When I reverse the code, the news excerpt displays but the sticky post strips all the images and full text out. I put “the_content” instead of “the_excerpt”, but it still doesn’t show the entire post ( but does if positioned above news post )

    Here’s my code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter developdesign

    (@developdesign)

    Here’s how the code looks when sticky post first and news post second.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thread Starter developdesign

    (@developdesign)

    Front page
    Code when sticky post first and news post second.
    http://pastebin.com/xgx1y1Na

    Code when news first, sticky second – not working
    http://pastebin.com/6WRSeHvU

    Thread Starter developdesign

    (@developdesign)

    Could anyone help me??

    Thread Starter developdesign

    (@developdesign)

    Note: This is the recent news code

    <?php
        query_posts('showposts=1&cat=3'); while(have_posts()) : the_post();?>
    <h2 class="entry-title"><?php the_category(3); ?></h2>
        <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <div class="entry"><?php the_excerpt(); ?></div>
    <?php endwhile; ?>

    Sticky post code here:
    http://pastebin.com/6WRSeHvU

    IF I use just sticky post then it shows image, but if I use a most recent news post above the sticky post then it strips the image and most of the content??
    Maybe I’m missing a reset query code, so that’s why it’s stripping sticky post or ?

    Thread Starter developdesign

    (@developdesign)

    If I use the following code to pull a specific post after the recent news code, I get the image but the paragraphs aren’t formated ( no paragraph separation between paragraphs )

    <?php $post_id = 134;
    $queried_post = get_post($post_id); ?>
    <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <?php echo $queried_post->post_content; ?>

    Note: I’m using ‘get a post” code is at top of page as well. Should I have an closing php tag with this code?

    <?php /*code to display slideshow*/ get_a_post(211); ?>
    <?php the_content(); ?>
    esmi

    (@esmi)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘latest news post then sticky post – sticky post image stripped out’ is closed to new replies.