WordPress.org

Forums

Category Specific Posts In Specific Page Areas (8 posts)

  1. adapting
    Member
    Posted 8 years ago #

    Hello,
    I have produced a mockup of my support query at the below URI:
    http://www.alanwho.com

    I want to be able to place 1 post (the latest post) from a specific category on a specific place on a page. I imagine this is possible with some sort of php call or modification of the loop.

    The example link above illustrates what I want roughly. The example shows categories such as 'Design' with a corresponding article in the same box and this concept is replicated on the same page for other categories.

    How can I do this?

  2. Samuel B
    moderator
    Posted 8 years ago #

    This thread should enlighten you - read it all.
    http://wordpress.org/support/topic/28203?replies=15#post-193667

  3. adapting
    Member
    Posted 8 years ago #

    Thanks for the reply. But there is a lot of information there that is closely related but not absolutely relevent. I am closer to understanding what I need in order to achieve the above.

    I can now imagine it is pretty simple. All I need to do is edit the existing loop or create another one specifically for rendering set catgegories.

    Anyone know the specific code, where to add it and how to reference it, to render a preset number of posts from a specific category in a PHP call?

  4. moshu
    Member
    Posted 8 years ago #

    Here is another thread that might be useful:
    http://wordpress.org/support/topic/38046?replies=35
    And for Loop codes don't hesitate to read The_Loop and other related articles from the Codex.

  5. adapting
    Member
    Posted 8 years ago #

    Man I am almost completely lost. I dont know php. I can see that the link - http://wordpress.org/support/topic/38046?replies=35 is relevent but not wholely. I see someone has been able to list posts by category. But I want a php call or query or whatever you call it to a specific category and a number of these on one page. All the links seem very complex solutions. I am sure what I want is fairly easy.

    Does anyone have an exact coding example of what I am asking?

    A coded example would be:
    <div id="category1">
    <?php some php call to some loop or category specific loop such as category 1?>
    </div>
    <div id="category2">
    <?php some php call to some loop or category specific loop such as category 2?>
    </div>

    Once again the link to a mockup of my dreams is at http://www.alanwho.com/mockup/

  6. moshu
    Member
    Posted 8 years ago #

    All the links seem very complex solutions. I am sure what I want is fairly easy.

    No, it is NOT easy. But we gave you all the possible sources that provide the code you can use. I don't think there will be anybody coding your whole index.php file. Sorry.

  7. Dgold
    Member
    Posted 8 years ago #

    Here's an example you're gonna love:
    http://mudsugar.com/

    So yes, it is possible. It is a *very* common question on this forum. The answer is in the links already posted above in this thead. It is somewhat complicated but totally do-able. You do not need to "know PHP" to do it, but you do have to tinker with it.

  8. moshu
    Member
    Posted 8 years ago #

    And if you scroll down on that mudsugar site and click on the About this theme link... you'll find out:
    - they started with an existing theme
    - looked around and learned/borrowed code from different places
    - it took months to achieve what they wanted

    ... so no, there is no "instant gratification" - it's a lot of hard work and learning. As opposed to "gimme the simple code" ;)

Topic Closed

This topic has been closed to new replies.

About this Topic