WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Give Sticky Post Different Layout (2 posts)

  1. core-basic
    Blocked
    Posted 1 year ago #

    I have a sticky post on my front page. Is there a way to give it a different layout than the other posts?

    I've had a look at
    http://codex.wordpress.org/Sticky_Posts

    and I know which classes to use to affect the css. Which is a very nice feature. But I'm wanting to change the physical html and php layout. I want my sticky post to have a completely different format than the one I've set up in my loop.

    To help give an idea of what I mean. For example I am showing the categories and date on all posts in the loop. I do not want to show these on my sticky posts. I also do not want my sticky post titles to be hyperlinks.

    I am not asking literally how to do the things I mentioned to give an idea. I am asking is it possible to give the sticky posts a completely different format? I want to know if it is possible customize their specific output to achieve the things mentioned not literally how to achieve the things.

    If it is possible to give sticky posts a different layout than the other posts how could it be done? Is there an if statement I could do?

    If sticky display this way elseif not sticky display another way

  2. core-basic
    Blocked
    Posted 1 year ago #

    Not bumping, just psoting the solution.

    I had no idea this function existed. Very cool. Very nice resource in the codex.

    http://codex.wordpress.org/Function_Reference/get_posts

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.