Forum Replies Created
-
AuthorPosts
-
November 17, 2017 at 10:28 am in reply to: Change size of featured image in a post, without changing main theme #877997
Hi John,
Thanks for the tip, indeed I didn’t know about the “blog post” element, which seems pretty useful ! Its funny how I keep discovering interesting features in the Enfold theme…
However I might not have understood it fully, but this solution seems to display X posts of a specific taxonomy (eg a post category, a post tag etc.). While in my case, i wanted to change the *display of each separate post*. Unless this allow to create some kind of of a template which can then be applied to each single post ? Or maybe I didn’t get how to properly use this element ?
Anyway we also have +100 posts on our website (its in French : http://5aconseil.com) and the 1st solution allowed me to change all of them at once…
Best regards
Bastien
if this could be useful to others, I made 1 change to your code so the “read more” link is added within the excerpt, which could be useful in some cases depending on the design you want…
/* Add a "read more" link" to masonry elements */ function ava_custom_script_mod(){ ?> <script> (function($){ $(window).on('av-height-change', function() { $('.av-masonry-entry').each(function() { var more = $(this).find('.av-masonry-read-more'); var cont = $(this).find('.av-masonry-entry-content'); if( more.length == 1 ) return; cont.append('<div class="av-masonry-read-more">Read more</div>'); }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_mod');
Perfect, this works, thanks a lot !
I would have slightly preferred a pure-php solution (like in 1st example) but since this works I will go with it, no problem & thanks a bunch !
-
AuthorPosts