Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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

    #591240

    Hey!

    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!
    Josue

    #592517

    Unfortunately 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?

    #594192

    Hi!

    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,
    Ismael

    #594418

    Great that worked well!
    Would it be possible to decrease the size of the gallery (and text beside)? like here:

    #594635

    Hey!

    The gallery size is determined by the its container, try changing the column from 1/2 to something smaller like 1/3.

    Best regards,
    Josue

    #594911

    Obviously 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.

    #595459

    Hey!

    The columns should constrain the width of the elements inside it. Example here: http://jhs-technik.de/produkte/schwenkarme-tragarme/

    Cheers!
    Ismael

    #595469

    of 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 work

    #596168

    Hey!

    Alright. Add this in the Quick CSS field instead:

    .template-blog article .avia-gallery {
        max-width: 50%;
        margin: 0 auto;
    }

    Cheers!
    Ismael

    #596193

    HI 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

    #596645

    Hey!

    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,
    Josue

    #596838

    Perfectly!! Thanks a lot

    #596983

    You are welcome, glad to help :)

    Regards,
    Josue

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.