Support » Fixing WordPress » Wondering how to achieve something, what plugin or coding for this…

  • Hello,

    I’m trying to find how to replicate the behaviour of a blog for my own website, however, I don’t find the “trick” to do so, could I ask for your help, please ? 🙂

    Take a look at , a news website using WordPress as a CMS.

    In the middle column, there are the excerpts of actual blog posts, belonging to all sorts of categories (their permalink stating ), excluding the posts belonging to the News category.

    In the left column, there are excerpts of news articles, belonging to the News category only (their permalink stating )

    This is this behaviour that I would like to be able to copy, all the posts save the News ones in the central column, and in the left column, only the News posts.

    I don’t think this requires to be a coding ninja, however I fell short of keywords to search, I don’t even know how to call this behaviour…

    Please, would you know how that can be achieved ? Thank you VERY MUCH if you can help !

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    I checked the site and the first idea that would come in my head was to create a child theme (so coding no plugin) and modify it so that will be 2 column page (if you look at it has a span with 150px width that holds posts from news and list) and for the span I would query posts from the 2 specific categories (news and list) ordering them by date and for the rest of the page I would exclude those 2 categories. If you consider to use this option then you’ll have to decide what function you’ll use to query the posts query_posts will always be an option but it is very debated you can also use get_posts.
    In both cases you’ll have to build the span (news and list) column manually so you’ll have to write some php/html/css code.
    Hope this info helps.

    Hi Sabinou,

    At Grist we actually have used a little code-fu to achieve this. What you see in the center column is not actually ‘everything except’ News, but instead everything we mark as ‘Featured’.

    We created a special taxonomy ( i.e. categorization system ) that keeps track of which posts are ‘featured’, and then we use WP_Query to get only posts in that taxonomy.

    That is probably a little heavy handed for what you need.

    The following will get you all posts except for those in categories 12 and 34 for example:

    $posts = new WP_Query( ‘cat=-12,-34’ );

    From there you can use the examples on the WP_Query page to output the posts as you wish.

    You definitely need to know some PHP to accomplish this, but the examples in the wordpress docs will take you pretty far, so just give it a shot!

    Hope that helps,
    Ben from Grist

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wondering how to achieve something, what plugin or coding for this…’ is closed to new replies.