Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.5.32
- This topic has 5 replies, 2 voices, and was last updated 9 years, 6 months ago by
Jennifer.
-
AuthorPosts
-
02/07/2017 at 2:29 pm #410321
Jennifer
ParticipantHi Steve,
I continue to be amazed by everything that Connections can do. You are amazing!
I saw someone else’s query about adding assigned categories on the entry page and have been successful with adding the following code to an override of the card.php file:
$entry->getCategoryBlock( array( ‘separator’ => ‘, ‘, ‘before’ => ‘‘, ‘after’ => ‘‘ ) );
However, I need to prevent the assigned category from displaying on any entries that are Individuals (OR… these folks are also inside of a category called “Members by Contact” so it’s this specific group that needs to not show the list of assigned categories, if that helps… doesn’t have to necessarily be done by Individuals if easier).
I’d be very grateful for any assistance you can provide with this.
What I’ve tried (may not be the right direction):
I read that Connections supports loading template files based on additional contexts and tried creating a 2nd version of card.php to do this (named “card-category.php” in both the plugin folder and child folder), but am receiving an error with the template shortcode (ERROR: Template card-category not found). I understand it’s not ideal to put anything in the plugin folder, but just did it as a test after striking out.Thank you in advance, and sorry to be wordy!
Jennifer
PS – Am still struggling with the other 2 custom field issues I emailed you about but I thought this might be easier to tackle first.
02/07/2017 at 3:29 pm #410336Steven Zahm
Keymaster@ Jennifer
Use an if statement, like so:
if ( 'individual' !== $entry->getEntryType ) { $entry->getCategoryBlock( array( 'separator' => ', ', 'before' => '', 'after' => '' ) ); }Now the category block will only display if the entry is not an individual.
As for the template, do not use the template shortcode option, Connections will pick up the template automatically if the file exists. One thing to keep in mind, the category template will only be picked up when viewing the related category. Hope that make sense?
02/07/2017 at 4:14 pm #410344Jennifer
ParticipantThis reply has been marked as private.02/07/2017 at 4:32 pm #410347Steven Zahm
Keymaster@ Jennifer
Type in my code, sorry:
if ( 'individual' !== $entry->getEntryType() ) { $entry->getCategoryBlock( array( 'separator' => ', ', 'before' => '', 'after' => '' ) ); }I think that should work… I missed typing the parans after
getEntryType02/07/2017 at 4:33 pm #410348Steven Zahm
Keymaster@ Jennifer
Oh, as for the template… it could be as simple as the file naming or where you put it, exactly. Hard to know for sure, not enough details.
02/07/2017 at 4:50 pm #410350Jennifer
ParticipantYOU ARE AMAZING!!! That did the trick beautifully. Thank you SO much!!!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
