"all galleries" and heavy inline css

Ask your query related with Photo Video Link Gallery Pro plugin In this Forum

Moderator: forum_m

Post Reply
atuccia
Posts: 2
Joined: September 22nd, 2016, 5:03 pm

"all galleries" and heavy inline css

Post by atuccia » September 23rd, 2016, 5:21 pm

Hello, I have some questions about showing all galleries. I began with free version, then bought the pro version but I cannot find an "all galleries" shortcode :(
So I wrote a page template cointaining the following code:

Code: Select all

<?php
$args = array('post_type' => 'pgp_gallery', 'post_status' => 'publish');
$pgp_galleries = new WP_Query( $args );
if( $pgp_galleries->have_posts() ) {
	while ( $pgp_galleries->have_posts() ) : $pgp_galleries->the_post();
		$id = get_the_ID();
        	echo do_shortcode( "[PGP id=$id]" );
	endwhile; 
}
?>
It works perfectly! 8-) (ok it's for the free version because I still have to migrate all galleries to pro, moreover, for some reason, it works only for versions up to 1.3.7, from 1.3.8 galleries are repeated)
But the rendered html is so heavy due to inline css :( For 10 galleries the resulting html is 1.3MB... and I have to add more galleries! :shock:

I don't need individual effects or css, for me I would be more important the website performance. Is there some solution? Is there a more appropriate plugin? (pro gallery? or it have the same working principles?)

support_staff
Posts: 7162
Joined: February 26th, 2015, 1:40 pm

Re: "all galleries" and heavy inline css

Post by support_staff » September 24th, 2016, 1:14 pm

Hello atuccia,
We really appreciate your efforts..
And for moving free version to pro version, both have different settings so galleries need to be re-created. If you find any trouble you can send the temp access at lizarweb[at]gmail[dot]com
We'll help you re-creating the galleries.
Thanks.

atuccia
Posts: 2
Joined: September 22nd, 2016, 5:03 pm

Re: "all galleries" and heavy inline css

Post by atuccia » September 24th, 2016, 3:19 pm

support_staff wrote:Hello atuccia,
We really appreciate your efforts..
And for moving free version to pro version, both have different settings so galleries need to be re-created. If you find any trouble you can send the temp access at lizarweb[at]gmail[dot]com
We'll help you re-creating the galleries.
Thanks.
Thank you, I know, I did some tries and I wrote a pair of SQL queries*** to migrate galleries. The website of my client have 10 galleries, in the worst case I will manually re-create the galleries.

But my question and my problem remain: how can I have a lighter html (with no repeated or at least with a lighter inline css) with multiple galleries?

***

Code: Select all

UPDATE wp_posts SET post_type = 'pgpp_post', guid = REPLACE(guid, "pgp_post", "pgpp_post") WHERE post_type = 'pgp_post';
UPDATE wp_postmeta SET meta_key = REPLACE(meta_key, "PGP_", "PGPP_"), meta_value = REPLACE(meta_value, "PGP_", "PGPP_") WHERE meta_key LIKE 'PGP_all_photos_details';
UPDATE wp_postmeta SET meta_key = REPLACE(meta_key, "PGP_", "PGPP_"), meta_value = REPLACE(meta_value, "PGP_", "PGPP_") WHERE meta_key LIKE 'PGP_total_images_count';
UPDATE wp_postmeta SET meta_key = REPLACE(meta_key, "PGP_", "PGPP_"), meta_value = 's:618:"a:16:{s:11:"PGPP_Effect";s:7:"effect2";s:21:"PGPP_Effect_animation";s:13:"right_to_left";s:22:"PGPP_Masonry_Thumbnail";s:2:"no";s:16:"PGPP_Image_Style";s:9:"rectangle";s:23:"PGPP_Show_Gallery_Title";s:3:"yes";s:21:"PGPP_Show_Image_Label";s:3:"yes";s:19:"PGPP_Gallery_Layout";s:8:"col-md-4";s:14:"PGPP_Open_Link";s:6:"_blank";s:10:"PGPP_Color";s:7:"#dd9933";s:18:"PGPP_Color_Opacity";s:3:"0.5";s:15:"PGPP_Font_Style";s:9:"Courgette";s:14:"PGPP_Light_Box";s:9:"lightbox2";s:17:"PGPP_Image_Border";s:2:"no";s:22:"PGPP_Image_Border_Size";s:1:"5";s:23:"PGPP_Image_Border_Color";s:7:"#FFFFFF";s:15:"PGPP_Custom_CSS";s:0:"";}";' WHERE meta_key LIKE 'PGPP_Gallery_Settings_%';
A bit gross and all galleries will have common settings only... but I couldn't find a best way. I got the settings from a pro version test gallery.

Post Reply

Return to “Photo Video Link Gallery Pro”