Category: Snippets

  • Shortcode that hides content from non-logged in Users

    Shortcode that hides content from non-logged in Users

    By using the shortcode in this way you can hide everything between the shortcode’s beginning, and its end. [loggedin_only]This content is only visible to logged-in users, though we haven’t activated on dev.gooloo.de, so you can actually see it.[/loggedin_only] To use this, add the following PHP Snippet to your WordPress’ functions.php or via a Code Snippets…

  • Automatically add a featured Image to all posts, that have none

    Automatically add a featured Image to all posts, that have none

    By using this code, your WordPress Website will automatically add a provided Image URL as the featured Image to all posts, that have currently no featured Image selected. Replace the URL with your desired Image URL. This snippet does the following: Updated: To use this:

  • Shortcode for Number of Users and Number of Posts

    Shortcode for Number of Users and Number of Posts

    With this code, you can dynamically show, how many users and posts your blog has, by using the shortcodes giving out this number: and giving out this number: Add this Code to your functions.php, f.ex. via Code Snippets.

  • Embed Divi Layouts

    Embed Divi Layouts

    This Code has multipe functionalities and requires the Premium-Theme Divi. Add to your functions.php, f.ex. through Code Snippets. Then, visit Divi > Divi Library and copy the shortcode next to the design you wish to embed.

  • Block enumarated E-Mails

    Block enumarated E-Mails

    We had a lot of sign-ups using 07370230723@domain.com. And we wanted to block that. We used the following functions.php Snippet to block enumarated E-Mails through WordPress. Insert into your functions.php, f.ex. with Code Snippets.

  • LazyLoad Divi Rows and Sections

    LazyLoad Divi Rows and Sections

    With this code, there will be added automatically lazyload-references to Divi Rows and Sections, as well as its inner content. This code is in Alpha and should be used carefully, although it’s currently in use on our main blog, www.gooloo.de, with no issues.

  • Barrier between Nextend Social Login’s Free Buttons and the reamining Container

    Barrier between Nextend Social Login’s Free Buttons and the reamining Container

    This adds a tiny divider between Nextend Social Login’s Free Version’s Buttons to login and your WordPress’ common E-Mail/Username and Password combination. Insert into the functions.php, f.ex. through Code Snippets.

  • Purge LiteSpeed Cache on the Homepage daily Mon-Fri

    Purge LiteSpeed Cache on the Homepage daily Mon-Fri

    Hi, We needed a small piece of code, that would purge the Homepage Monday through Friday selectively, at 12:01pm CET. Please note: This code uses the Berlin Timezone at 12:01pm CET. Change according to your needs. Insert into the functions.php, f.ex. through Code Snippets.

  • Back to top

    Back to top

    This PHP Code adds a Back-to-top Button using a Font Awesome Icon. The used design is used on our main blog, www.gooloo.de, and can be changed how you like. Please note, that this Code needs the Font Awesome Library to work. See more details, here.

  • Clean-up Action Scheduler and its Logs

    Clean-up Action Scheduler and its Logs

    To automatically clean-up finished Action Scheduler Actions and its Logs, upload the following Code to mu-plugins in the wp-content Folder and name it “action-scheduler-cleanup.php”. Or download it here (Caution: This is the “old” version at the bottom of this post), directly. Final Update To accomodate everything, this code was revised and is now based on…