- This topic has 5 replies, 2 voices, and was last updated 8 years, 6 months ago by Tom.
-
AuthorPosts
-
April 3, 2016 at 4:13 pm #183926Paul
Hi Tom,
After updating WP core to 4.4.2 and manually updating the GP Premium plugin to the latest version and entering my license key, all of a sudden my Media Library will not load. All I get is the spinner, but no images or other media items will load.
I noticed you posted this as an issue at https://github.com/gambitph/WP-OTF-Regenerate-Thumbnails/issues/11 — I don’t know if this is related to GeneratePress or GP Premium, but do you have any ideas as to why the Media Library wouldn’t be loading?
The reason I discovered this issue is because after the manual update of GP Premium, my custom-positioned header logo disappeared from all my pages. I checked Customizer > Site Identity > Logo and noticed to logo image was set. When I went to set my Logo, the Media Library wouldn’t load.
April 3, 2016 at 5:56 pm #183935TomLead DeveloperLead DeveloperHi Paul,
Good research, the automatic image resizer doesn’t play nicely on a small percentage of hosts.
You can disable it with this snippet: https://gist.github.com/generatepress/fcbb9065a958e6e0f9ef
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Let me know if you need more info ๐
April 3, 2016 at 8:49 pm #183952PaulHi Tom,
Thanks for pointing me to
define( 'GP_IMAGE_RESIZER', true );
, but where do I put the code?In the meantime, I should let you know what was preventing the grid view of the Media Library… two bits of code that I had added to my child theme’s functions.php file earlier in the day:
<!-- Strips More tag when Excerpt is used on post --> <?php add_filter('generate_more_tag','generate_disable_more_tag'); function generate_disable_more_tag() { return false; } ?> <!-- End More tag --> <!-- Add Previous Next buttons to bottom of Pages --> <?php add_action( 'generate_after_content','generate_add_page_next_prev' ); function generate_add_page_next_prev() { if ( ! is_page() ) return; ?> <div class="prev-next"> <?php previous_post_link( '<div class="nav-previous prev-next-button"><span class="prev" title="' . __('Previous','generate') . '"> %link</span></div>', 'Previous' ); next_post_link( '<div class="nav-next prev-next-button"><span class="next" title="' . __('Next','generate') . '"> %link</span></div>', 'Next' ); ?> </div> <?php } ?> <!-- End Previous Next buttons -->
Once I removed them, I was able to once again properly access the Media Library. However, I still do want to 1) strip the ‘More’ tag from posts when Excerpts are used and 2) add Previous and Next links at the bottom on PAGES.
Once I hear back from you as to where I need to add that bit of code you mentioned in your previous comment, I will add it and then add the code above back to functions.php to see if that helps.
If you see anything wrong with the way I’m handling the More tag and the Previous/Next on Pages, or with the PHP in general please let me know. You can find my entire functions.php file here: http://pastebin.com/UE50THds
April 3, 2016 at 10:52 pm #183971TomLead DeveloperLead DeveloperYou can add that line into the same functions.php file at the bottom.
Try removing all of the HTML comments from the file (
<!-- whatever -- >
).April 4, 2016 at 10:25 am #184123PaulThanks Tom, worked perfectly!
April 4, 2016 at 10:27 am #184125TomLead DeveloperLead DeveloperYou’re welcome ๐
-
AuthorPosts
- You must be logged in to reply to this topic.