• I’ve searched high and low both here and in the Codex for an answer to this but no luck so far.

    I am building a local community site that will be mainly static pages but the front page will have news items (posts). So far this is easy and works well. Now the tricky part.

    I would like to have a sticky/static post before any news items. I can almost do this with the Adhesive plugin. The problem is that Adhesive will only let me use the main template. I’d like to use my static page template for the sticky post as it is tweaked to not display the time/date, etc..

    I can keep one page sticky and use my static page template by using the Static Front Page plugin instead but then I can’t have the news posts as well.

    Is there a way to do this? Many thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter attilathenurse

    (@attilathenurse)

    I guess that’s a “no” then ??

    Open up your Main template.
    At the top you wil see code sort of like this:

    <?php get_header(); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    !!!

    <div align=center id="post-<?php the_ID(); ?>"><div id=title><a class="title" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>

    Without the “!!!”. Take those out and replace it with your code for the sticky text and it will be at the top of the page and it won’t go anywhere.

    Thread Starter attilathenurse

    (@attilathenurse)

    Hi, Bang,

    Sorry for the delay in replying but I’ve been away for a few days.

    Your solution almost worked perfectly. The downside is that when viewing the archives the sticky post is added to the top of every article when it should only be visible at the top of the site home page.

    Nice try, though ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sticky problem (pun intended)’ is closed to new replies.