Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
October 8, 2015 at 1:50 pm #515782
Hi!
Im tryng to show a subtitle under the title (in flexible masonry post) in the home overlay.
Im using plugin WP Subtitle, and with this previous answer, I succed showing in the inner post:
https://kriesi.at/support/topic/subtitles-under-the-title/Now, how can I show in the overlay of the home section?
I try something like this, but did not work (masonry_entries.php):
if(strpos($this->atts['caption_elements'], 'title') !== false){ $markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false, 'id'=>$entry['ID'], 'custom_markup'=>$this->atts['custom_markup'])); echo '<h4>the_subtitle();</h4>'; $items .= "<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>"; }
October 9, 2015 at 7:30 am #516186Hi Victor!
Thank you for using Enfold.
Please edit line 609:
$items .= "<{$html_tags[0]} id='av-masonry-".self::$element."-item-".$entry['ID']."' class='{$class_string}' {$linktitle} {$markup} data-sub='{$sub}'>";
.. replace it with:
$sub = '</h4>'.the_subtitle().'</h4>'; $items .= "<{$html_tags[0]} id='av-masonry-".self::$element."-item-".$entry['ID']."' class='{$class_string}' {$linktitle} {$markup} data-sub='{$sub}'>";
Add this in the Quick CSS field to display the subtitle on hover:
#top .isotope-item:hover:before { content: attr(data-sub); display: block; width: 100%; height: 500px; position: absolute; top: 0; left: 0; color: red; transition: none; z-index: 1000; }
Adjust the values if necessary.
Cheers!
IsmaelOctober 9, 2015 at 10:24 am #516289Thanks Ismael! But nothing happens yet..
I add your code in masonry_entries.php
and the css too… but still not showing the subtitle
Any ideas?
Thanks a lot!October 10, 2015 at 11:25 am #516760 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.