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 4 months, 2 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.

Add new condition to infinity_base_sidebars()

Tagged: child theme, sidebars

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 9 months ago by Cory Piña.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • August 21, 2013 at 7:07 pm #3509
    Cory Piña
    Participant

    I’m creating a custom template for the archive of a specific post category, and want to specify content to display in the sidebar.

    I found from where the sidebars are called using the function infinity_base_sidebars() in /engine/includes/sidebars.php.

    But adding my own version of this file to my child theme doesn’t seem to overwrite the function. Is there a way to overwrite sidebars.php? Am I going about this the wrong way?

    • This topic was modified 11 years, 9 months ago by Cory Piña. Reason: grammar
    August 22, 2013 at 8:17 pm #3517
    Bowe Frankema
    Member

    I think in this case it would be easier to create a new sidebar file. So do something like:

    • create *posttype-archive.php* in your Child Theme
    • create new-sidebar.php in your Child Theme
    • Replace infinity_get_sidebar(); in the *posttype-archive.php* with infinity_get_template_part( 'new-sidebar' );
    • Register the new sidebar widget in functions.php of your child theme
    • Modify the new-sidebar file so that it calls the new widget

    Does this make sense?

    Greetings,
    Bowe

    August 28, 2013 at 11:01 am #3535
    Cory Piña
    Participant

    Bowe, that does make sense, thank you.
    We’ve got it working now.

  • 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