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.6.11, custom field
- This topic has 6 replies, 2 voices, and was last updated 5 years, 5 months ago by
Ralph Garcia.
-
AuthorPosts
-
09/28/2017 at 2:48 pm #436411
Ralph Garcia
ParticipantI’ve been able to create a custom field and implement it onto the card file. However when viewing the entry only the text will show and not the title.
For example, if my custom field is “Favorite Food” and the text input is “Hot Dogs”, only “Hot Dogs” is displaying.
Attachments:
You must be logged in to view attached files.09/28/2017 at 3:09 pm #436413Steven Zahm
Keymaster@ Ralph
Unfortunately it is not possible for me to tell from a screenshot. My best guess is the custom field title is there but is being hidden by CSS. The default is to display the title, perhaps you hid it by accident?
09/28/2017 at 3:26 pm #436414Ralph Garcia
ParticipantI haven’t adjusted any other coding. Here’s how it looks
echo '<div class="cn-detail cn-clear' . $show . '" id="cn-detail-' , $uuid , '">'; echo '<div class="cn-left">'; $entry->getImage( array( 'image' => $atts['image'], 'height' => 120, 'width' => 100, 'fallback' => array( 'type' => $atts['image_fallback'], 'string' => $atts['str_image'] ) ) ); echo '</div>'; echo '<div class="cn-right">'; if ( $atts['show_title'] )$entry->getTitleBlock(); if ( $atts['show_org'] ) $entry->getOrgUnitBlock(); if ( $atts['show_contact_name'] )$entry->getContactNameBlock( array( 'format' => $atts['contact_name_format'] , 'label' => $atts['str_contact'] ) ); if ( $atts['show_family'] )$entry->getFamilyMemberBlock(); if ( $atts['show_addresses'] ) $entry->getAddressBlock( array( 'format' => $atts['addr_format'] , 'type' => $atts['address_types'] ) ); if ( $atts['show_phone_numbers'] ) $entry->getPhoneNumberBlock( array( 'format' => $atts['phone_format'] , 'type' => $atts['phone_types'] ) ); if ( $atts['show_email'] ) $entry->getEmailAddressBlock( array( 'format' => $atts['email_format'] , 'type' => $atts['email_types'] ) ); if ( $atts['show_dates'] ) $entry->getDateBlock( array( 'format' => $atts['date_format'], 'type' => $atts['date_types'] ) ); if ( $atts['show_links'] ) $entry->getLinkBlock( array( 'format' => $atts['link_format'], 'type' => $atts['link_types'] ) ); $text = $entry->getMeta( array( 'key' => 'business_offerings', // This should match exactly the field id used when registering the custom field. 'single' => TRUE // Do not change this. ) ); if ( ! empty( $text ) ) echo '<p>' . esc_html( $text ) . '</p>'; if ( $atts['show_im'] ) echo $entry->getImBlock(); if ( $atts['show_social_media'] ) echo $entry->getSocialMediaBlock(); $entry->getContentBlock( $atts['content'], $atts, $template ); if ( $atts['enable_bio'] && $entry->getBio() != '' ) { echo '<div class="cn-bio" id="cn-bio-' , $uuid , '">'; if ( $atts['enable_bio_head'] ) echo '<h5>' , $atts['str_bio_head'] , '</h5>'; echo $entry->getBioBlock(); echo '</div>'; } if ( $atts['enable_note'] && $entry->getNotes() != '' ) { echo '<div class="cn-notes" id="cn-bio-' , $uuid , '">'; if ( $atts['enable_note_head'] ) echo '<h5>' , $atts['str_note_head'] , '</h5>'; echo $entry->getNotesBlock(); echo '</div>'; } echo '</div>'; echo '</div>'; ?>
-
This reply was modified 5 years, 5 months ago by
Steven Zahm. Reason: Correct code formatting
09/28/2017 at 4:41 pm #436428Steven Zahm
Keymaster@ Ralph
Ok, I was thinking you were doing something else… Your code is mostly correct, it needs to be:
if ( ! empty( $text ) ) echo '<p>Favorite Food: ' . esc_html( $text ) . '</p>';
Hope that helps!
09/28/2017 at 5:00 pm #436430Ralph Garcia
ParticipantPerfect. Thank you!
Additionally, how can I remove the “Search By Category” option from the first page? Please see attached screenshot.
Attachments:
You must be logged in to view attached files.09/28/2017 at 5:30 pm #436434Steven Zahm
Keymaster@ Ralph
That does not appear to be part of Connections … perhaps this is something you added to the page? Edit the page … is there anything above the
[connections]
shortcode?09/28/2017 at 5:36 pm #436435Ralph Garcia
ParticipantCorrect again. Thank you!
-
This reply was modified 5 years, 5 months ago by
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.