Home › Forums › Free Themes › Photo Perfect › Photo Gallery Not Full Width
Tagged: gallery, photo gallery, photo-perfect
- This topic has 5 replies, 2 voices, and was last updated 7 years, 3 months ago by wensolutions.
-
AuthorPosts
-
August 23, 2017 at 5:03 am #51552dreamframerParticipant
Hi guys,
I need help. Since the theme update, my gallery is not full width anymore. Can somebody please help me?
This is the link to take a look:
http://dreamframer.photography/photo-gallery-print-shop/
Thank you,
Ivan
August 23, 2017 at 6:29 am #51562wensolutionsKeymasterHello @dreamframer,
When inspected your site URL we found that you have used Jet-pack gallery. As the theme does not recommend Jet-pack plugin the issue might have caused due to the conflict with the plugin .
So please use the default WordPress gallery and for your information the default gallery is working absolutely fine .
Hope this helps .
Best Regards!!
August 23, 2017 at 12:40 pm #51594dreamframerParticipantThanks for the quick answer! I disabled JetPack, but then the gallery switched from masonry to thumbnails. Is there a way to make it look like a masonry instead?
I also noticed that my content area is not full width anymore. Could you please tell me which line should I change to fix that?
I turned on JetPack again temporarily.
Thank you!
August 23, 2017 at 1:12 pm #51601dreamframerParticipantI managed to change it to full width by changing:
.comtainer { width: 1300 px; }
to
.container { width: 100%; }
So, Now I’m only stuck with the look of the gallery. I am sure I had JetPack activated before, and I had a similar problem with the gallery width, but I don’t remember how I fixed it.
August 23, 2017 at 1:29 pm #51602dreamframerParticipantI changed:
$GLOBALS[‘content_width’] = apply_filters( ‘photo_perfect_content_width’, 640 );
to:
$GLOBALS[‘content_width’] = apply_filters( ‘photo_perfect_content_width’, 1920 );
And now it looks good. I’m pretty sure there is a better solution though.
August 24, 2017 at 1:11 am #51625wensolutionsKeymasterHello @dreamframer,
The content width can be changed by setting the global value. However if you are directly changing the code in the theme files, the changes will be lost upon theme update.
Our suggestion is to take Child theme Approach for the task.
Child theme references :
https://codex.wordpress.org/Child_Themes
You can also create the child theme using the plugin given below.
https://wordpress.org/plugins/wp-child-theme-generator/
After creating the child theme add in the following code in your child theme’s functions.php file :
/** * [photo_perfect_child_custom_content_width change global content width] * @return [int] [content width value] */ function photo_perfect_child_custom_content_width() { return 1920; } add_filter('photo_perfect_content_width', 'photo_perfect_child_custom_content_width' );
Hope this helps.
Best Regards!!
-
AuthorPosts
- You must be logged in to reply to this topic.