Forum Replies Created
-
AuthorPosts
-
07/04/2016 at 7:54 am in reply to: Two versions of directory with different category groups visible #381429
Carolin Collins
ParticipantAh yes, that makes sense. Cheers! Will I send the final category lists to you to your email address?
Carolin Collins
ParticipantDon’t worry about wasting time. I’ve learnt other things along the way :)
Carolin Collins
ParticipantWoohoo! Sorted :) Glad even the mighty make those kinds of mistakes. Welcome to my world! Thanks for all your help. C.
Carolin 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>Carolin 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/
Carolin 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.
Carolin 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>Carolin 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>Carolin Collins
ParticipantGreat, thanks so much – that worked perfectly! You have been very helpful.
On another note, is it possible to turn this into a multiple selector rather than a single selector drop-down?
Carolin Collins
ParticipantThanks so much for that. So if I want to take out multiple options and add multiple ones, do I just duplicate the lines incl. the semi-colon at the end?
add_filter( ‘cn_education_level_options’, ‘cn_change_edu_lvl’ ) );
function cn_change_edu_lvl( $options ) {
unset( $options['1'] ); // Remove 1st - 4th Grade unset( $options['5'] ); unset( $options['7'] ); $options['50'] = 'CPA Qualification'; // Add an education option. $options['51'] = 'Diploma'; return $options;}
-
AuthorPosts
