GeneratePress Theme Free: Some Useful Resources to Check Out!

Gĩthĩnji
6 min readJun 14, 2019
Copyright: GeneratePress.Com

For those who use GeneratePress Theme, here are some useful resources I use. Since the theme’s core spirit is speed, so are these resources. If you care about your website speed, I suggest strongly that you buy the premium version of GeneratePress.

1. Social Share plugin — here you can use either Scriptless Social Sharing (and choose SVG option in settings) or the GP Social Share plugin which is purely SVG based. I prefer the former since it is more robust.

Edit: If you are using GP’s inbuilt schema, you might notice that the Scriptless Social Sharing plugin text for links (e.g. Facebook, Twitter, etc) appears in your post description when you test with the Google Structured data testing tool, either before or after the text or both depending on how you chose the buttons to appear. This is because the plugin, which was originally made for Genesis Framework that also uses hooks, is hooked to show before or after content depending on where you choose the buttons to appear. To avoid this, choose the manual implementation for the buttons and: (i) for premium GP, copy the shortcode [scriptless] and create a new hook (remember to tick the shortcode box) and then set it to appear before content (create another hook and select after content if you want to show the buttons twice); (ii) for free GP, just copy and paste this code in your child theme’s functions.php, the Code Snippets Plugin or your custom code plugin (remove add_action( ‘generate_before_content’, ‘gp_share_buttons’, 10); or add_action( ‘generate_after_content’, ‘gp_share_buttons’, 10); if you want the code to either only show after the content or before the content respectively)

2. Breadcrumbs — since the theme does not come with inbuilt breadcrumbs, I use these over at Dimox. You paste the code in your functions.php or paste in the code snippets plugin. You can use GP Premium elements to hook the second part of the code where you might want the breadcrumbs to appear (and tick the PHP option). Since no styling is provided, You might need to style them differently. I did so using the Inspect Element feature of the desktop browsers. Also, bookmark the page since the code is updated occasionally. This is the CSS code I am using to style the breadcrumbs (CSS class might be different from yours, so use inspect the element and see what these classes are).

EDIT: There is now a plugin for using these breadcrumbs. Just download it from here (click where it says ‘clone or download’ and choose ‘download zip’) and upload it through your WordPress plugin’s page or FTP and once activated, you can find its settings under Appearance>Customise>Dimox Breadcrumbs. You will still have to style the breadcrumbs if you don’t like the default look. The beauty of this plugin is that it also works with the free GeneratePress theme in the customiser area.

To use the plugin with the free GP, copy and paste the PHP code here in your child theme’s functions.php, the Code Snippets Plugin or your Custom Code plugin.

Here is a list of GP hooks and GP filters if you would like to show the breadcrumbs elsewhere than indicated in the code above (below header).

You can use elements with premium GP by creating a new hook and paste the shortcode [dimox_breadcrumbs]. Ensure you tick the shortcode option then select in display settings where you want the breadcrumbs to appear (after header, inside container, etc) and also whether you want them to appear sitewide or on specific pages.

3. Speed Up Google Analytics — I use the plugin CAOS | Host Google Analytics Locally to host my google analytics code locally and update it daily automatically using cron.

EDIT: I moved to a manual implementation as provided in this post because the plugin above was messing with my website’s bounce rate. But if you are not confident about tinkering with code, I suggest you stick with the plugin.

There is another way to speed up Google Analytics by using the Minimal Analytics code. However, you will lose some tracking features such as AdWords. (Copy paste the code in the head section of your header.php file or by using a plugin like Flying Analytics which already has the feature built-in).

4. Speed Up Comments — if your website has lots of comments, or you are looking at ways to speed up WordPress Comments, you can lazy load them using the Lazy Load for Comments plugin to improve loading speed. However, this plugin only works with the default WordPress commenting system.

Edit: This plugin uses jQuery to lazyload comments. So, if you don’t use jQuery on your site, the plugin might increase rather than reduce your site’s loading time. There is an open request to remove jQuery dependency which you can follow to find out when it will be implemented. I don’t use jQuery on my site, so I uninstalled this plugin for now and just break site comments to 15–20 per page in the WordPress Discussion settings.

5. Author Box — I am using the manual theme integration option provided in this post to show the author box. Just hook the code using GP elements and set it to display before_comments_container with a priority of 10 if you want it to appear just after the end of the post or adjust the priority to whatever you want (e.g. 10, 20, 30, etc) wherever you want the author box to appear. Here is the PHP code I am using.

Here is the CSS code to style the author box (you can edit it to suit your theme’s appearance).

If the author description appears below the author image, add the CSS code .author-info .author-avatar {float: left}

Edit: I switched to a custom author box provided in GeneratePress’s Volume demo site (see the box below this post). If you’re using Premium GeneratePress Theme, paste this code in a new hook element and tick the PHP box and then set it to display after content.

If using Free GP theme, paste this code your child theme’s functions.php, your custom code plugin or use the Code Snippets plugin

Here is the CSS code I am using to style the box (Use Tom’s Simple CSS plugin to add the code or just paste it in the Customiser’s Additional CSS area):

Another more detailed way to show the author box is in this article.

6. Subscribe to Comments

If you use the default WordPress commenting system, you may want your readers to subscribe to comments to be notified when you or others reply to their comments, or when new comments are made to the post they subscribed for comments. For this, I use the Lightweight Subscribe to Comments plugin.

Edit: I recently switched to the Comment Reply Email plugin by Johnny Nguyen since this plugin allows subscribing only to replies about your own comments, a feature which the other plugin above does not have. The Comment Reply Email plugin is also a lightweight plugin.

7. Use Local Avatars

If you want to cut down on that extra request thrown by Gravatar on your page speed testing tools, I recommend you use the Simple Local Avatars plugin. You can set your local avatar and also define if your commenters can upload their own.

8. Set a default avatar.

For WordPress users without a custom avatar of their own, it can either display a generic logo or a generated one based on their email address. If you want to set a specific custom avatar for this purpose, copy and paste this code in your child theme’s function.php, your custom code plugin, or the Code Snippets Plugin (set it to load everywhere).

Then go to Settings>Discussions and look for your “Custom Avatar” in the Gravatar section and select it.

9. GP Elements Admin Link

This plugin adds a button to the admin bar to easily jump straight into Elements, add new Elements or duplicate existing Elements in GP Premium.

That’s it. 😊

Check out my blog at afrocave.com

--

--

Gĩthĩnji

Blogs at afrocave.com. Has interests in politics, governance and public finance.