Skip to content
  • Blog (1)
  • About Us
  • Tags
  • Donations
1SMARTchicken - Code Made Easy
  • Tutorials (195)
  • Reference (2173)
  • Snippets (69)

Category: WordPress Snippets

1SMARTchicken - Code Made Easy

Category: WordPress Snippets

  • Tutorials (195)
  • Reference (2173)
  • Snippets (69)
  • Blog (1)
  • About Us
  • Tags
  • Donations
1SMARTchicken - Code Made Easy
  • Tutorials (195)
  • Reference (2173)
  • Snippets (69)
1SMARTchicken - Code Made Easy

Category: WordPress Snippets

  • Tutorials (195)
  • Reference (2173)
  • Snippets (69)
  • Home
  • Snippets
  • WordPress Snippets
  • Page 2
WordPress Snippets

WordPress – Enqueue a Style Sheet

July 30, 2024 / Snippets, WordPress Snippets

To enqueue a stylesheet in WordPress, you use the wp_enqueue_style function in your theme’s functions.php file.

WordPress Snippets

WordPress – Exclude Pages from the Search Page Results

July 30, 2024 / Snippets, WordPress Snippets

By default WordPress will search all posts including pages. You may wish to have the search function only search posts, excluding pages in the results.

WordPress Snippets

WordPress – Have the Search Results URL Show the Terms

July 30, 2024 / Snippets, WordPress Snippets

The URL that shows when doing a search from within WordPress is quite long and human unreadable to some extent. This can be changed to a simpler format.

WordPress Snippets

WordPress – Hide the Admin Bar from Anyone Not an Admin

July 30, 2024 / Snippets, WordPress Snippets / Backend

In WordPress, there is an admin bar at the top of the site backend and frontend when logged in. You may want to hide this from the general user.

WordPress Snippets

WordPress – Limit the Number of Items in a WooCommerce Cart

July 30, 2024 / Snippets, WordPress Snippets / WooCommerce

When using WooCommerce you may want to limit the number of items that can be initially placed in the cart, or can be increased to while already in the cart.

WordPress Snippets

WordPress – Limit the Number of Search Results Per Page

July 30, 2024 / Snippets, WordPress Snippets

By default WordPress uses the amount defined in Settings > Reading to set how many results appear on the search results page, which is the same as archives.

WordPress Snippets

WordPress – Prevent Auto Updates to Themes and Plugins

July 30, 2024 / Snippets, WordPress Snippets / Backend

Though you may have the auto updates to themes and plugins turned off, sometimes installing a new plugin turns it on for that plugin. This can be disabled.

WordPress Snippets

WordPress – Redirect a Search Directly to the Lone Result

July 30, 2024 / Snippets, WordPress Snippets

When a user does a search on your WordPress site and there’s only one result, it’s simple to save them a click by redirecting them directly to the post.

WordPress Snippets

WordPress – Register Child Styles to Overcome Caching

March 9, 2025 / Snippets, WordPress Snippets / Cache

When done properly, style sheets can be kept to a minimum size and there isn’t an urgency to place them in browser cache. A time code can overcome caching.

WordPress Snippets

WordPress – Remove Old Sitemap After SEO Framework Install

March 9, 2025 / Snippets, WordPress Snippets

After doing a migration from Yoast SEO to The SEO Framework, you may find that you cannot get rid of the /sitemap_index.xml file which is no longer needed.

WordPress Snippets

WordPress – Reset Gravity Form Fields when the Form Reloads

July 30, 2024 / Snippets, WordPress Snippets / Form, Gravity Forms

When using Gravity Forms along with Gravity Perks (using the GP Reload Form add-on), you can set your forms to reset after sending, preparing them for another form fill.

WordPress Snippets

WordPress – Scroll the Page after Submitting a Gravity Form

July 30, 2024 / Snippets, WordPress Snippets / Form, Gravity Forms

When using Gravity Forms you can decide on a per-form basis as to whether or not you want to automatically scroll to the page top after a form submit.

WordPress Snippets

WordPress – Set a Price Message for WooCommerce Grid Items

July 30, 2024 / Snippets, WordPress Snippets / WooCommerce

The WooCommerce product grid shows the pricing for each product by default. But that can be changed on a per-product basis to deliver a custom message.

WordPress Snippets

WordPress – Show More Product Variations Per Edit Page

July 30, 2024 / Snippets, WordPress Snippets / Backend, WooCommerce

When using WooCommerce and a product has many variations, you want to increase the number of variations that show on one pagination page for editing.

WordPress Snippets

WordPress – Turn On or Off PHP Error Warnings and Notices

July 30, 2024 / Snippets, WordPress Snippets / Error

When developing a WordPress site, you may want to turn on the PHP error warnings and notices to ensure that everything is running smoothly before launch.

WordPress Snippets

WordPress – Uncheck WooCommerce Shipping Address by Default

July 30, 2024 / Snippets, WordPress Snippets / WooCommerce

When a user is in the WooCommerce checkout, they’ll find that the “Ship to a Different Address” box checked is by default.

← Previous 1 2

or View All Tags

Tutorials

  • HTML Tutorials (40)
  • CSS Tutorials (45)
    • CSS Flexbox (12)
  • JavaScript Tutorials (18)
  • jQuery Tutorials (13)
  • PHP Tutorials (0)
  • SQL Tutorials (0)
  • Python Tutorials (79)
    • Python File Handling (4)
    • Python and MySQL (11)
  • WordPress Tutorials (0)

Reference

  • HTML Reference (244)
    • HTML Tags (107)
    • HTML Attributes (46)
    • HTML Events (76)
    • HTML Resources (15)
  • CSS Reference (309)
    • CSS Selectors (55)
    • CSS Properties (220)
    • CSS Functions (17)
    • CSS Resources (17)
  • JavaScript Reference (556)
    • JavaScript Selectors (7)
    • JavaScript Operators (12)
    • JavaScript Statements (17)
    • JavaScript Methods (285)
    • JavaScript Properties (162)
    • JavaScript RegExp (45)
    • JavaScript Resources (28)
  • jQuery Reference (220)
    • jQuery Selectors (54)
    • jQuery Methods (140)
    • jQuery Ajax Methods (16)
    • jQuery Properties (17)
    • jQuery Resources (9)
  • PHP Reference (460)
    • PHP Keywords (59)
    • PHP Functions (400)
    • PHP Constants (0)
    • PHP Resources (1)
  • SQL Reference (290)
    • SQL Keywords (59)
    • MySQL Functions (138)
    • SQL Server Functions (83)
    • SQL Resources (10)
  • Python Reference (94)
    • Python Methods (86)
    • Python Resources (8)
  • WordPress Reference (0)

Snippets

  • HTML Snippets (3)
  • CSS Snippets (12)
  • JavaScript Snippets (5)
  • jQuery Snippets (8)
  • PHP Snippets (1)
  • SQL Snippets (3)
  • Python Snippets (1)
  • WordPress Snippets (36)
1SMARTchicken - Code Made Easy

333 Washington Blvd.
Suite 126
Marina del Rey, CA 90292
United States

contact2026@1smartchicken.com

  • About Us
  • Privacy Policy
  • Cookie Policy
  • Terms & Conditions

Search for Code:

or View All Tags

Copyright © 2026 1SMARTchicken | All Rights Reserved.