Skip to content
WPCode Library

WPCode Library

Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!

Get WPCode
See all Features

  • Features
    • Code Snippets Library
    • Smart Conditional Logic
    • Advanced Code Revisions
    • Private Cloud Library
    • Marketing Scripts & Conversion Pixels
  • Pricing
  • Snippets Library
  • Help Center
    • Docs
    • Support
  • Blog
  • Login
  • Get WPCode

Snippets library

Browse Snippets
Claim your Free Profile
Add Snippet

Location: everywhere

Photocrati 10 theme – Replace the Blog default page title with anything else (“News” in this case)

add_filter( ‘reactr_title’, ‘replace_blog_with_news’, 10, 1 ); function replace_blog_with_news( $title ) { if ( is_singular( ‘post’ ) ) { $title = str_replace( ‘Blog’, ‘News’, $title ); } return $title; }Continue reading

Envira – Enable AIOSEO fields for the gallery edit pages

function add_my_custom_metabox_id($pass_over_defaults) { $pass_over_defaults[] = ‘aioseo-settings’; return $pass_over_defaults; } add_filter(‘envira_gallery_metabox_ids’, ‘add_my_custom_metabox_id’);Continue reading

NextGEN – Fix 414 Request URI too long for https://example.com/nextgen-dcss

define(‘NGG_INLINE_DYNAMIC_CSS’, true);Continue reading

NextGEN Pro – Exclude ngg_galleria and ngg_galleria_init JS from SiteGround Optimizer (to try solve issues with Pro Lightbox or slideshow loading)

add_filter( ‘sgo_javascript_combine_exclude’, ‘js_combine_exclude’ ); function js_combine_exclude( $exclude_list ) { $exclude_list[] = ‘ngg_galleria’; $exclude_list[] = ‘ngg_galleria_init’; return $exclude_list; }Continue reading

Imagely and Photocrati theme – Fix the Customizer displaying only the “Widgets” tab

function imagely_theme_mods() { set_theme_mod(‘reactr_blog_single_elements_positioning’, ”); } add_action( ‘init’, ‘imagely_theme_mods’ );Continue reading

NextGEN – Disable Imagick usage to try fixing some uploading issues

define(‘NGG_DISABLE_IMAGICK’, true);Continue reading

NextGEN – Set the “newer to older” sort direction for the galleries in Manage Galleries

function my_custom_gallery_order( $order ) { return ‘DESC’; } add_filter( ‘ngg_manage_galleries_items_order’, ‘my_custom_gallery_order’ );Continue reading

Prevent WP Media from automatically resizing the images on upload

add_filter( ‘big_image_size_threshold’, ‘__return_false’ );Continue reading

Envira – Output all of the gallery images within the feed instead of just the first one

class EnviraGalleryCustom { private function render_feed_output() { // Return empty if gallery data is not set. if ( ! isset( $this->data[‘gallery’] ) ) { return ”; } $gallery_items = $this->data[‘gallery’]; $gallery_html = ”; foreach ( $gallery_items as $id => $item…Continue reading

NextGEN Gallery – display full-image previews while sorting images

add_action( ‘admin_head’, function() { ?>Continue reading

Page navigation

Previous 1 … 72 73 74 75 76 … 340 Next

Company

  • About
  • Careers
  • Testimonials
  • Blog
  • Affiliates
  • Contact
  • Twitter
  • Facebook

Powerful Code Features

  • Ready-made Snippets Library
  • Smart Conditional Logic
  • Advanced Auto-insert Locations
  • Global Header & Footer Scripts
  • Safe Error Handling
  • WordPress Code Generators

  • Ecommerce Conversion Pixels
  • Dynamic Content Elements
  • Reduce Number of Plugins
  • Save Snippets in Cloud
  • Easy Code Management
  • Advanced Code Revisions

Helpful Links

  • Support
  • Documentation
  • Plans & Pricing
  • WordPress Hosting
  • Start a Blog
  • Make a Website

Copyright © 2025 WPCode. WPCode® is a registered trademark of WPCode, LLC

Terms of Service
Privacy Policy
FTC Disclosure
Sitemap
WPCode Coupon

The WordPress® trademark is the intellectual property of the WordPress Foundation. Uses of the WordPress®, names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation. WPCode is not endorsed or owned by, or affiliated with, the WordPress Foundation.

Snippet Preview