logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$8
Plugin/setup advice for some aside-type content

Something a little different: I'm looking for some tips on how best to set up this configuration (plugins etc), rather than specific code to do things:

1) I have the default post type set up and running for my main blog posts - these are tagged (according to country) and categorised (by industry) - no problems there.

2) I need to set up a second post type (I assume) to handle 'Features' - this will include:
-- Galleries
-- Interviews
-- In depth

Galleries are fine - I'm using the 'Attachments' plugin to drop them in, and styling with galleria.js. Interviews and In Depth can both take a fairly standard blog post format.

My question: what's the easiest way to get these three 'categories' displaying and archived - I'm going to display 'features' on the homepage sidebar, so it'll need to say 'Gallery: Latest photos from our place' , 'Interview: With someone or other', and display the most recent 3 entries in the features post type.

If I can pin a new group of categories, with just the 3 (Galleries, Interviews, In Depth) categories in it, that could work, I guess. Ideally there'd be a way to set these 3 options up as post types (and to show this on the frontend).

Tips/advice/workflows?

This question has been answered.

Jon | 05/06/11 at 10:26pm Edit


(2) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    05/07/11
    3:26am
    Christianto says:

    When I want to get content from database (post/page) and display it in specific place/specific way, I use to create new Query and custom loop for it. With this, I can controlled what content should appear in the loop by passing the argument.
    Maybe you can create it too by passing the post type parameter and category parameter.

    Previous versions of this answer: 05/07/11 at 3:26am

  • avatar
    Last edited:
    05/07/11
    3:33am
    Denzel Chia says:

    Hi,

    There is no need for any type of custom post or custom taxonomy.
    Just set them up as normal categories.

    In your home page, where you want to show any of this category,
    just use the WordPress WP_Query to display posts in that category only.
    http://codex.wordpress.org/Function_Reference/WP_Query
    you can also limit the number of posts this way. No need to worry about pagination problems too.

    If you know how to code widgets using WP_Widget, just add WP_Query to your widget output, and with flexible settings, I am sure your widget will be able to output any category, and limit number of posts.

    The default, post, page, category and archives is enough to achieve what you want. And sure to work without any problems and backward compatibility if you decided to change themes.
    Custom post type or taxonomies will "disappear" when you change themes, you will need to modify your new theme again.

    Thanks.
    Denzel

    Previous versions of this answer: 05/07/11 at 3:33am

    • 05/07/11 6:34am

      Jon says:

      This could be an option, and it would solve the URL issues (as they'd fall under /features) but it's important that the features don't show up in the main blog listing (those posts are a separate type).

      If I was to exclude the features posts from the loop as it runs on the regular pages, can I create a duplicate to have an archive of the features as well?

    • 05/07/11 6:35am

      Jon says:

      Theme issues are not an issue - I'm building this from scratch with the Toolbox theme - if I need to add bits to functions.php, I can do.

    • 05/07/11 9:11am

      Denzel Chia says:

      Hi,


      but it's important that the features don't show up in the main blog listing (those posts are a separate type).


      Same issue here. In your main blog list, you will use WP_query to exclude the category or categories that you do not want to show in your "regular" posts.


      If I was to exclude the features posts from the loop as it runs on the regular pages, can I create a duplicate to have an archive of the features as well?


      If you want to have a category page for the features only, you can make use of the wordpress template hierachy. Example category-{slug}.php - If the category's slug were features, WordPress would look for category-features.php. So you just create a file name category-features.php and put a normal wordpress loop in it. I will show only all the posts under category features.
      And the same advantage, you will not have pagination problems.

      More examples here. http://codex.wordpress.org/Template_Hierarchy

      Thanks.
      Denzel

    • 05/08/11 9:52am

      Jon says:

      Thanks Denzel - that's got me to where I needed to be. I guess I was overcomplicating things by trying to set up extra custom post types. Template hierarchy info was useful - thanks.

This question has expired.



Jon voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.