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.17
- This topic has 12 replies, 2 voices, and was last updated 6 years, 7 months ago by
Carolin Collins.
-
AuthorPosts
-
06/20/2016 at 11:56 am #380082
Carolin Collins
ParticipantJust a quick question. I currently have the cMap template installed for a new client site we are developing. However, it has now transpired that the client wants an excerpt as part of the listing. Is this possible with cMap? Or do I need to switch to Excerpt Plus? The client could possibly live without the map functionality (although it would be a plus) but they also need all the contact/web address/social media profiles etc. info as part of the initial listing above the excerpt.
In addition, they are also looking at Circled because they like a) the circular photo and b) the option of the multi-column layout. Is it possible to show Circled with all the above contact info before the excerpt or is that a no-go for this template?
Any recommendations? Thanks!!
06/20/2016 at 2:03 pm #380099Steven Zahm
Keymaster@ Carolin
Regardless of them template you choose, you’ll have to edit its PHP files in order to accomplish the requirements. The easiest path seems it would be to edit the cMap template to add the except. Here’s how…
Edit the
card.php
file found in this folder:
../wp-content/plugins/cmap/
Add
$entry->getExcerpt();
where you want the excerpt to be displayed. I highly recommend reading this tutorial on how to make this change update safe.Hope that helps!
06/28/2016 at 8:28 am #380774Carolin Collins
ParticipantHi Steven
Very sorry that I’m back again but I am not having any luck with this. Here is my code for the card.php file (which I have created in the override location as per the “Update Safe” instructions. I also tried it in the original card.php as well in case something is wrong with my override but I’m not having any luck here either.
This is my code extract:
<?php $entry->getContentBlock( $atts['content'], $atts, $template ); ?> <div class="cn-clear" style="display:table;margin: 10px 0;width:100%;"> <div style="display:table-cell;vertical-align:middle;"> <?php if ( $atts['show_categories'] ) { $entry->getCategoryBlock( array( 'separator' => ', ', 'label' => __( $atts['str_category_label'], 'cnt_cmap' ), ) ); $entry->getExcerpt(); } ?> </div> <div style="display:table-cell;text-align:right;vertical-align:middle;"> <?php if ( $atts['show_last_updated'] ) { cnTemplatePart::updated( array( 'timestamp' => $entry->getUnixTimeStamp(), 'style' => array( 'font-variant' => 'small-caps', ) ) ); } ?> </div> </div>
06/28/2016 at 8:48 am #380775Steven Zahm
Keymaster@ Carolin
In this placement, the excerpt will only be shown if you have turned on the display of the categories. Add a new line between the
}
and the?>
lines and then move$entry->getExcerpt();
to that new line.Hope that helps!
06/28/2016 at 9:13 am #380776Carolin Collins
ParticipantThanks for your reply, Stephen. I do have the display categories switchen on, so I thought it should work fine. However, just in case, I have moved that now but it still doesn’t show. It’s as if it doesn’t understand the “Excerpt” variable? Here is my new code:
<?php $entry->getContentBlock( $atts['content'], $atts, $template ); ?> <div class="cn-clear" style="display:table;margin: 10px 0;width:100%;"> <div style="display:table-cell;vertical-align:middle;"> <?php if ( $atts['show_categories'] ) { $entry->getCategoryBlock( array( 'separator' => ', ', 'label' => __( $atts['str_category_label'], 'cnt_cmap' ), ) ); } $entry->getExcerpt(); ?> </div> <div style="display:table-cell;text-align:right;vertical-align:middle;"> <?php if ( $atts['show_last_updated'] ) { cnTemplatePart::updated( array( 'timestamp' => $entry->getUnixTimeStamp(), 'style' => array( 'font-variant' => 'small-caps', ) ) ); } ?> </div>
06/28/2016 at 9:16 am #380777Carolin Collins
ParticipantJust to say that I definitely have the file in the right override location as when I make other changes to the PHP it comes through to the webpage.
06/28/2016 at 10:00 am #380778Steven Zahm
Keymaster@ Carolin
Hmmm… ok, just to confirm, you do have text in the bio field, correct? That is what the excerpt text is created from. Or perhaps there is CSS hiding it. Can you see if the excerpt in the page source?
06/28/2016 at 10:07 am #380779Carolin Collins
ParticipantYes, we do have text in the bio field. Have checked the page source and no reference to excerpt in it.
This is the link to the directory on the development site http://www.cainterimmanagers.ie/new/membership/members/member-directory/
06/28/2016 at 10:11 am #380780Carolin Collins
ParticipantI just went and added the word Test onto the page just below the excerpt code to make sure again it’s the right card.php file and it’s coming up on the page. So I’m at a loss?
<?php $entry->getContentBlock( $atts['content'], $atts, $template ); ?> <div class="cn-clear" style="display:table;margin: 10px 0;width:100%;"> <div style="display:table-cell;vertical-align:middle;"> <?php if ( $atts['show_categories'] ) { $entry->getCategoryBlock( array( 'separator' => ', ', 'label' => __( $atts['str_category_label'], 'cnt_cmap' ), ) ); } $entry->getExcerpt(); ?> Test </div> <div style="display:table-cell;text-align:right;vertical-align:middle;"> <?php if ( $atts['show_last_updated'] ) { cnTemplatePart::updated( array( 'timestamp' => $entry->getUnixTimeStamp(), 'style' => array( 'font-variant' => 'small-caps', ) ) ); } ?> </div> </div>
06/28/2016 at 10:48 am #380783Steven Zahm
Keymaster@ Carolin
Sigh! I’m an idiot! You need to use this line to output the excerpt:
echo $entry->getExcerpt();
The only difference is that
echo
precedes it. -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.