WordPress.org

Support

Support » Plugins and Hacks » Custom Content Type Manager » Show recent posts by category

Show recent posts by category

  • I have been searching for a plugin like this for a long time. Thank you for this. I have a school website that I manage and the CCTM lets me create sections for ‘cluster’ teachers to add daily homework assignments. I created cpt for each cluster (6 of them) and for each subject(English, math, science, history) So each cluster had a page to add daily homework into custom fields.
    I noticed that the demo posts I created do not show in the ‘recent posts’ side bar (I’m using the twentytwelve theme). Is there a way to have recent posts show in a sidebar based on the cluster? For example, while on the Cluster One page, all that would show in the sidebar is the previous homework assignments by cluster one and so on for each cluster?

    http://wordpress.org/extend/plugins/custom-content-type-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ideally what I’d like to do is have a ‘Homework’ link in the main menu that is a drop dwon and shows each cluster. When a cluster is selected, it will take them to that cluster’s homework posts with the latest 5 posts showing and older posts in the sidebar using a calendar.

    Plugin Contributor fireproofsocks

    @fireproofsocks

    I haven’t looked at the 2012 theme, but WP themes can have some pretty bone-headed ways of listing content. You can list posts very flexibly using the included GetPostsQuery class and its methods. For basic GUI usage, you can use the summarize-posts shortcode:

    http://code.google.com/p/wordpress-custom-content-type-manager/wiki/summarize_posts_shortcode

    As for formatting it into a dropdown menu, that’s completely up to you. I try to provide sample examples of output for all the functions, but the exact HTML/CSS I purposely leave to the designer because it’s impossible to have a one-size-fits-all approach when it comes to the public views.

    Thanks. the html/ css isn’t a problem. I wasn’t sure about what specific function to use. Normally, I’d use the query_posts function. Is that not advisable?

    Plugin Contributor fireproofsocks

    @fireproofsocks

    You’re free to use whatever function works for you. I wrote the GetPostsQuery class because I got frustrated with the inane caveats and poorly-designed/restrictive interface of query_posts and its related functions. GetPostsQuery gives you a streamlined interface for fetching posts matching complex criteria and it automatically gets all the custom-fields in a single method.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show recent posts by category’ is closed to new replies.
Skip to toolbar