Show Sidebar Log in
Commons In A Box Logo
  • Home
  • About
    • Project Team
    • Logos and Graphics
  • Showcase
    • CBOX Classic Showcase
    • CBOX OpenLab Showcase
  • Demo
  • Get Started
  • Documentation
    • Technical Guide
    • CBOX Classic Guide
    • CBOX OpenLab Guide
  • Support Forums
    • CBOX Classic
    • CBOX OpenLab
    • Developers Forum
  • News

Group Admins

  • Profile picture of Scott Voth

CBOX Classic Support

Public Group active 3 months, 4 weeks ago

This group provides support for Commons In A Box Classic, our original software for community-building. Register for an account or log in to commonsinabox.org, then join the group and post your question here.

Custom Post Types and CBOX Theme

  • This topic has 2 replies, 2 voices, and was last updated 8 years, 7 months ago by Troy Welch.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • September 27, 2016 at 5:06 pm #6104
    Troy Welch
    Participant

    Hi, sort of a follow up on my previous question, I just want to make sure I’m on the right track. I’m adding a custom post type (using wp-types/toolbox) for resources to our CBOX site with several custom fields and custom taxonomy (categories and tags).

    Typically I would add (at a minimum) the following templates (possibly sub-divided into template parts) to display content from this CPT (assuming CPT slug is: resources): single-resources.php, archive-resources.php, taxonomy-resources_category.php, taxonomy-resources_tag.php.

    While it is a little different for each of the templates at the core is creating a new WP_Query object with a post_type argument for the CPT and then running the loop with render statements (types_render_field for the CPT plugin I’m using) for each of the custom fields.

    So, the question is, will this be a workable approach with the CBOX theme as it has been for other themes, or does the infinity engine provide for Custom Post Types in the option/configuration files?

    Kind regards,

    Troy

    September 28, 2016 at 4:26 am #6105
    Christian Wach
    Participant

    Hi @troy in my experience, the CBOX theme behaves no differently to other WordPress themes when it comes to CPTs – if you want full control over their appearance, then you’ll need to add the template files that you mention. I would, of course, recommend that you work with a child theme so that you leave the parent theme untouched.

    September 28, 2016 at 11:13 am #6106
    Troy Welch
    Participant

    Thanks Christian. I spin up a child theme as part of my installation routine, always good advice.

     

    Tory

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In
Group logo of CBOX Classic Support
  • Home
  • Forum
  • Announcements
  • Docs
  • Members 287
  • Send Invites

Groups

Newest | Active | Popular | Alphabetical
  • Group logo of CBOX Classic Support
    CBOX Classic Support
    287 members
  • Group logo of CBOX Pioneers
    CBOX Pioneers
    71 members
  • Group logo of CBOX Developers
    CBOX Developers
    40 members
  • Group logo of CBOX OpenLab Support
    CBOX OpenLab Support
    22 members
  • Group logo of CBOX-OL Testing Partners
    CBOX-OL Testing Partners
    12 members

CBOX has its roots in the CUNY Academic Commons, which in turn was made possible through funding from The City University of New York itself.

CUNY Logo

CUNY Academic Commons Logo

City Tech logo

The Commons In A Box was made possible through the generous support of the Alfred P. Sloan Foundation.

Alfred P. Sloan Foundation Logo

NEH Logo

The CUNY Graduate Center has directly contributed to the CUNY Academic Commons, housing the project since its inception, and has contributed to CBOX through its GC Digital Initiatives.

CUNY Graduate Center Logo

CUNY Graduate Center Digital Initiatives Logo

Powered by Commons In A Box
css.php
Skip to toolbar
  • About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
  • Log In
  • Register