Tagged: josue
-
AuthorPosts
-
February 29, 2016 at 12:54 pm #590693
Dear team
how can I display the text-content above the gallery instead of below.
See example here:
http://jhs-technik.de/wordpress/news/Blog entries are marked with format “gallery”. Moving the format to “standard” or other will kill the nice looking of the gallery.
Regards
February 29, 2016 at 11:49 pm #591240Hey!
Try adding this at the very end of your theme / child theme functions.php file:
if(!function_exists('avia_gallery_slideshow_filter')) { function avia_gallery_slideshow_filter($current_post) { //search for the first av gallery or gallery shortcode preg_match("!\[(?:av_)?gallery.+?\]!", $current_post['content'], $match_gallery); if(!empty($match_gallery)) { $gallery = $match_gallery[0]; if(strpos($gallery, 'av_') === false) $gallery = str_replace("gallery", 'av_gallery', $gallery); if(strpos($gallery, 'style') === false) $gallery = str_replace("]", " style='big_thumb' preview_size='gallery']", $gallery); $current_post['content'] = str_replace($match_gallery[0], "", $current_post['content']); $current_post['content'] .= do_shortcode($gallery); $current_post['slider'] = ""; } return avia_default_title_filter($current_post); } }
Cheers!
JosueMarch 3, 2016 at 10:04 am #592517Unfortunately it did not work out… still displaying text underneath the gallery.
I added the code in the functions.php file.
http://jhs-technik.de/wordpress/news/Would it be possible to decrease the size of the gallery (and text beside)?
Like this example?March 7, 2016 at 11:08 am #594192Hi!
Please replace the code with this:
function avia_gallery_slideshow_filter($current_post) { //search for the first av gallery or gallery shortcode preg_match("!\[(?:av_)?gallery.+?\]!", $current_post['content'], $match_gallery); if(!empty($match_gallery)) { $gallery = $match_gallery[0]; if(strpos($gallery, 'av_') === false) $gallery = str_replace("gallery", 'av_gallery', $gallery); if(strpos($gallery, 'style') === false) $gallery = str_replace("]", " style='big_thumb' preview_size='gallery']", $gallery); $current_post['content'] = str_replace($match_gallery[0], "", $current_post['content']); $current_post['content'] .= do_shortcode($gallery); $current_post['slider'] = ""; } return avia_default_title_filter($current_post); }
Best regards,
IsmaelMarch 7, 2016 at 4:40 pm #594418Great that worked well!
Would it be possible to decrease the size of the gallery (and text beside)? like here:March 7, 2016 at 10:51 pm #594635Hey!
The gallery size is determined by the its container, try changing the column from 1/2 to something smaller like 1/3.
Best regards,
JosueMarch 8, 2016 at 10:12 am #594911Obviously that doesnt work when using the shortcodes [av_one_half first] together with the blog format “gallery”. Text-content is displayed “half” but gallery still goes below in full size. When changing it to “standard” the gallery is messed up showing only thumbnails.
Please login and have a look.March 9, 2016 at 11:06 am #595459Hey!
The columns should constrain the width of the elements inside it. Example here: http://jhs-technik.de/produkte/schwenkarme-tragarme/
Cheers!
IsmaelMarch 9, 2016 at 11:35 am #595469of course in the normal sites it works, but not in the blog section: http://jhs-technik.de/news/
Using the blog format “gallery” together with columns doesnt workMarch 10, 2016 at 9:38 am #596168Hey!
Alright. Add this in the Quick CSS field instead:
.template-blog article .avia-gallery { max-width: 50%; margin: 0 auto; }
Cheers!
IsmaelMarch 10, 2016 at 10:33 am #596193HI Ismael
that looks very good so far… last thing would be to place the text on the right side of the gallery.
Which code should I add to achieve that?Regards
March 11, 2016 at 2:09 am #596645Hey!
Use this CSS code instead:
@media only screen and (min-width: 767px) { .template-blog article.post-entry-type-gallery .entry-content > p{ position: absolute; right: 0; width: 50%; } .template-blog article .avia-gallery { max-width: 50% !important; } }
Best regards,
JosueMarch 11, 2016 at 12:41 pm #596838Perfectly!! Thanks a lot
March 11, 2016 at 6:43 pm #596983You are welcome, glad to help :)
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.