Category: Snippets

  • [Update] Animated Gift Box Overlay with FontAwesome for a Giveaway

    [Update] Animated Gift Box Overlay with FontAwesome for a Giveaway

    We used this code example to promote a giveaway with Lush. You can use and edit this code freely. Also: If you don’t want the additional functionality, scroll down, to only use the DIV container, and associated CSS. Add as a PHP Snippet to your functions.php, f.ex. via Code Snippets Plugin. See the Pen Animated…

  • Automatically append a Word or Phrase after a Post Title, based on Category ID

    Automatically append a Word or Phrase after a Post Title, based on Category ID

    This code is very simple. It adds a seperator (|) and a desired word or phrase at the end of a post, when it is in your defined category ID. For example, if you set the ID to 1, all posts in category ID 1 will have this text appended. You can see it in…

  • Add a Text (f.ex. Privacy-related) before your Comments

    Add a Text (f.ex. Privacy-related) before your Comments

    With this code, an text passage will be placed right before your comments, if they’re open for that post. You can modify the text within and use basic HTML. To use this, add it to your Theme’s functions.php, or via a Code Snippet Plugin.

  • Notify IndexNox API on Category description Update

    Notify IndexNox API on Category description Update

    We’re using RankMath for all of our SEO needs, but one place hasn’t been integrated fully into any SEO Plugin: The Categories. We saw, that categories’ descriptions we’re outdated and no Search Engine was notified, whilst posts, and pages, we’re updated correctly. To add the categories’ edit, we’ve added the following Code sample. Add it…

  • Last modified Schema Output Shortcode

    Last modified Schema Output Shortcode

    Especially, when you’re writing irregularly or you simply want Google and Co. to exactly know, when your blog was last edited, you can add this code to your Theme’s functions.php, or via a Code Snippet Plugin. Place it at the bottom of your website, f.ex. in the Footer, for a visible “Last Edit” Date output.…

  • Remove class from Post Thumbnails

    Remove class from Post Thumbnails

    When you use this code, it will remove all classes associated to your <img>. This might be especially helpful, when you’re switching from Blogger to WordPress. To use this code, add it to your Theme’s functions.php, or by a Code Snippet Plugin.

  • Remove surrounding <p> from <img> tags

    Remove surrounding <p> from <img> tags

    Using this snippet, your image will not be contained within a <p> tag. So, instead of <p class=”xy”><img src=””>, your img will be embedded in the <img> Tag only. This might be helpful for page builders, like Divi, or Elementor. To use this, add this function to your functions.php or via a Code Snippet Plugin.

  • 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.