Halloween Sale 15% off Ends in See the plans

Snippet Library

WordPress code snippets, ready to use

3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.

1–15 of 15 snippets “pixel”

  • PHP Media

    Change the Big Image Size Limit

    Sets the size above which WordPress scales down very large uploaded images (2560 pixels by default), for example to 1920 pixels to save disk space and bandwidth.

  • PHP Media

    Disable Big Image Scaling

    Stops WordPress from creating a scaled-down "-scaled" copy of images larger than 2560 pixels, so the original file is used as uploaded.

  • PHP Content

    Stops posts from being published with a featured image smaller than the size you set, such as 1200 by 630 pixels, so social previews and hero images never look blurry.

  • PHP Analytics & Tracking

    Pinterest Tag

    Adds the Pinterest tag to every public page and records page visits, with an option to wait for cookie consent.

  • PHP Analytics & Tracking

    Reddit Pixel

    Adds the Reddit Ads pixel to every public page and tracks page visits, with an option to wait for cookie consent.

  • PHP Content

    Adds plain share links for X, Facebook, LinkedIn, WhatsApp and email under each blog post. No third-party scripts or tracking pixels are loaded.

  • CSS Frontend & Design

    Stop Sideways Scrolling on Phones

    Prevents the whole page from scrolling sideways on phones when a wide image, embed or full-width block sticks out a few pixels past the screen edge.

  • PHP Analytics & Tracking

    TikTok Pixel

    Adds the TikTok pixel to every public page and records page views, with an option to wait for cookie consent.

  • PHP Analytics & Tracking

    X (Twitter) Pixel

    Adds the X (formerly Twitter) website tag to every public page for conversion tracking and audiences, with an option to wait for cookie consent.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.