Welcome To Snipplr


Everyone's Recent Snippets Tagged wordpress



« Prev 1 2 3 4 5 ... 50
  1. FAV

    WordPress/WooCommerce - Redirect add to cart button to the checkout page

    Automatically redirect users to the checkout page once a product has been added to the cart. This code should go to your functions.php file.
    PHP 7 views posted 2 years ago by catswhocode
  2. FAV

    SQL queries to change http to https in WordPress posts/pages

    More info: https://www.catswhocode.com/blog/install-https-wordpress
    SQL 4 views posted 2 years ago by catswhocode
  3. FAV

    Generate all old PDF preview images in WordPress

    From WordPress 4.7 when you upload a PDF it generates jpg previews. All pdf will remain without previews, or you can use this script to generate previews.
    PHP 6 views posted 2 years ago by ginoplusio
  4. FAV

    Contact Form 7 Fields on 2 Columns

    Displaying Contact Form 7 fields on 2 columns using CSS.
    HTML 8 views posted 3 years ago by deliciousthemes
  5. FAV

    Dazzle menu strikethrough line to underline

    Changing the Dazzle`s strikethrough line menu style to underline.
    CSS 4 views posted 3 years ago by deliciousthemes
  6. FAV

    Select Wordpress posts by number of revisions

    Too many revisions taking up space in your database? Use this script to find which posts have more than 10 - and then you can figure out what to do with them.
    PHP 4 views posted 3 years ago by JoshChris
  7. FAV

    Wordpress Query: Sort posts nearest proximity to farthest

    A quick query example for a wordpress database query that gets posts ordered by distance via the custom fields `latitude` and `longitude`.
    PHP 4 views posted 3 years ago by JoshChris
  8. FAV

    Wordpress plugin for Snipplr

    This is the simple plugin for your wp site , with this plugin you can embed snippets code from http://snipplr.com . Easy to use , just paste url from http://snipplr.com and thats it. Version: 1.1
    PHP 7 views posted 4 years ago by snipembed
  9. FAV

    WordPress Video Modal Widget

    A plugin that adds widget functionality to a third-party video modal plugin. The widget accepts a YouTube video ID and a thumbnail URL of the user's choice. It then generates a thumbnail link that launches a video modal via the third-party plugin. Op...
    PHP 6 views posted 4 years ago by julian90
  10. FAV

    Wordpress Loop - WP_Query

    Wordpress Loop - WP_Query
    PHP 8 views posted 4 years ago by alanyoshida
  11. FAV

    How to add a simple jQuery script to WordPress

    First you need to write your script. In your theme folder create a folder called something like 'js'. Create a file in that folder for your javascript. E.g. your-script.js. Add your jQuery script to that file (you don't need <script> tags in a .js fi...
    jQuery 12 views posted 4 years ago by designermedia
  12. FAV

    WordPress Parent Page with Child Page Excerpts

    Snippet for a parent page to list child pages with excerpts.
    PHP 11 views posted 4 years ago by hussong
  13. FAV

    Allow login from specific IP Address

    Allow login from specific IP Address
    PHP 9 views posted 4 years ago by nbpurohit
  14. FAV

    Disable "Add to basket" button for price zero

    Disable "Add to basket" button for price zero
    PHP 2 views posted 4 years ago by nbpurohit
  15. FAV

    WordPress - redirect to the post instead of archive page when search query returns single result

    Courtesy Kevin Chard at WPSnipp.com. Adding this snippet to the functions.php of your wordpress theme will redirect your search to the post automatically when wordpress only returns a single search result.
    PHP saved by 2 people 9 views posted 4 years ago by adambundy
  16. FAV

    Migrate a Wordpress

    Moving a wordpress site for local dev, to staging, to production? This SQL snippet has done the job more often than not. It may not be 100% full proof but it has saved my butt hundreds of times. Please, if you know other tables or enhancements share...
    SQL 4 views posted 4 years ago by brownrl
  17. FAV

    Wordpress add multiple image upload custom field to any post type

    Hi, here i implement multiple image upload custom field to page post type if you want it for another post type just change post type name. Add this following code to your current theme’s function.php file. Go to your pages from wordpress admin a...
    PHP 16 views posted 4 years ago by nbpurohit
  18. FAV

    Add Login / Logout to Primary Menu

    Adds a Logout link to the end of your Primary Navigation is the user is logged in; else adds a Login link to the end of your Primary Navigation.
    PHP 11 views posted 4 years ago by entreprenerds
  19. FAV

    Wordpress: Show all active plugins

    Show a list of active plugins on current site. I use it for diplaying in ManageWP and transfer to documentation
    PHP saved by 2 people 9 views posted 4 years ago by ellegaarddk
  20. FAV

    WordPress login screen

    Source: https://css-tricks.com/snippets/wordpress/customize-login-page/ Put them in your theme functions.php or make it a plugin.
    PHP 14 views posted 4 years ago by pauloc
  21. FAV

    2 Step use of WordPress 4 Customizer

    To use WordPress 4 Customizer API I'd need just to do 2 steps: define a data in the array, and call a custom registering function.
    PHP saved by 1 person 4 views posted 4 years ago by micklevin
  22. FAV

    WordPress Remove buttons from the TinyMCE editor

    Thanks to Tom McFarlin for this: https://gist.github.com/tommcfarlin/86e4f040bcc641a86f59
    PHP saved by 1 person 2 views posted 5 years ago by adambundy
  23. FAV

    get parent id wordpress

    Get parent id of a category in the category template
    PHP 5 views posted 5 years ago by cld23
  24. FAV

    Rename WordPress folder

    Sometimes it is usefull to hide that you're using wordpress. Rename wp-content folder to "media" and add this un wp-settings.php just before including the settings.
    PHP 2 views posted 5 years ago by burnandbass
  25. FAV

    Wordpress - remove the version number from styles and scripts

    Put it in functions.php
    PHP 5 views posted 5 years ago by burnandbass
  26. FAV

    Wordpress: Disable HTML in Wordpress comments

    You might need to strip out HTML in comments and here's how.
    PHP 15 views posted 5 years ago by chrisaiv
  27. FAV

    Wordpress: Replace a theme's Google font with your own

    You like a theme but it's referencing a Google font you want to switch out. Here's the simplest way to do it, by keeping the .class names but switching out the Google Font URL
    PHP 3 views posted 5 years ago by chrisaiv
  28. FAV

    Wordpress: Change admin email to new users (example 2)

    This is similar to [example 1](http://snipplr.com/view/77687/wordpress-change-admin-email-to-new-users/) but more portable.
    JavaScript 5 views posted 5 years ago by chrisaiv
  29. FAV

    Wordpress: Change admin name to new users

    enter the full name you want displayed alongside the email address
    PHP 3 views posted 5 years ago by chrisaiv
  30. FAV

    Wordpress: Change admin e-mail to new users (example 1)

    enter the full email address you want displayed
    JavaScript 2 views posted 5 years ago by chrisaiv
« Prev 1 2 3 4 5 ... 50