-
AuthorPosts
-
January 26, 2017 at 7:11 pm #739087
I have been looking to create a flip card from blog posts and was hoping if anyone could assist with this. I have been looking at the postslider.php and have made a start as you will see if you scroll down to the latest news from the 1st link below. I have also supplied a second link to what i am trying to achieve (i have added what id like to display in text on the front and back card on the 2nd link) which is a flip card from the blog posts. I have managed to get the 1st part the front to flip but cant seem to work out the second part displaying the back using this theme. Any help and assistance will be greatly appreciated and I look forward to your reply.
- This topic was modified 7 years, 9 months ago by Dave.
January 31, 2017 at 4:46 am #740468Hey Dave!
Thank you for using Enfold.
The “flip” effect requires “back” and “front” container which are not present in the postslider’s markup. You’ll need to modify the structure of the element if you want to apply the effect. The file is located in the config-templatebuilder > avia-shortcodes directory, look for the postslider.php file.
Best regards,
IsmaelJanuary 31, 2017 at 1:29 pm #740607Hi Ismael, Thank you for the reply.
I have been working in this file but i am trying to understand where the excerpt part of the code is and also which part is the the tile and thumbnail so that i can add front to title and thumb and back to excerpt. I was hoping you may be able to shed some light on where these maybe in the file. I did do a quick test and got the front to flip with the code below but not sure about the back, i commented out the code i had in. Is this something you may be able to help with please? I understand what is needed from the css and the html elements like front and back im just not sure about the PostSlider php code and which part is the title and which is the thumb and excerpt so that i can add the divs in the correct location.Hope this finds you well and look forward to your reply
February 1, 2017 at 6:35 am #741007Hi!
This is the “excerpt” part:
$excerpt = apply_filters( 'avf_post_slider_entry_excerpt', $excerpt, $prepare_excerpt, $permalink, $entry ); $output .= !empty($excerpt) ? "<div class='slide-entry-excerpt entry-content' $markup>".$excerpt."</div>" : "";
If you want to include the date, comments etc. Include this block of code.
if($show_meta && !empty($excerpt)) { $meta = "<div class='slide-meta'>"; if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio') { $link_add = $commentCount === "0" ? "#respond" : "#comments"; $text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' ); $meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></div><div class='slide-meta-del'>/</div>"; } $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)); $meta .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>"; $meta .= "</div>"; if($blogstyle !== "elegant-blog") { $output .= $meta; $meta = ""; } }
Regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.