Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 2 3 4 5 6 ... 44
How to put sidebars footer on twenty twelve theme again. Part 1: Insert the call in the footer.php
1 51 posted 6 years ago by almendro
Wordpress admin area functions
3 66 posted 7 years ago by andrewcolby
Breaks up an address (in this case returned by Advanced Custom Fields Location plugin) into it's components. Additionally, sorts a multidimensional array of locations alphabetically by state. This works for basic addresses assuming that address is in...
1 75 posted 7 years ago by devowhippit
For this to work add class "[CPT]-menu-item" to your menu item.
0 108 posted 7 years ago by ihatetomatoes
register custom menus
0 80 posted 7 years ago by thesmu
This allows you to create a custom page template in your plugin. Say your plugin creates a custom post type and you want to override the standard archives page template to display your custom post type in a special way. You could achieve this by crea...
0 78 posted 7 years ago by bitsculptor
Easy way to access request URI to WP in order to not repeat whole templates for minor changes
0 76 posted 7 years ago by jefrancomix
Wordpress Widget Basic Stucture
1 83 posted 7 years ago by Scoldy
Turns Wordpress custom menus into responsive-ready menu that comes with foundation framework. code goes into functions.php
0 120 posted 7 years ago by zartgesotten
Automatically link Twitter usernames in WordPress - Paste the code into the functions.php of your theme
0 192 posted 7 years ago by ederwp
This snippet is great for someone creating a wp theme which supports RTL as well as LTR since in enables you to use one function for multiple instances.
0 41 posted 7 years ago by sagive
this is a simple script to take iframe parameters and build an iframe via a shortcode
1 75 posted 7 years ago by bitsculptor
Add this snippet to `wp-config.php` to remove the file editor links from the WordPress admin menus. Read more about... [disabling the WordPress file editor](http://www.orderofbusiness.net/blog/disable-wordpress-file-editor/)
0 53 posted 7 years ago by tacudtap
This is a combined version of Bill Erickson's hide post editor and rilwis' Metabox include for specific IDs. It hides the editor for a specified post ID. You can have multiple IDs, just separate with commas.
1 73 posted 7 years ago by rickahontas
This snippet shows how to retrieve information from the SEO plugin of Yoast, to be used for front-end use. This snippet is taken from the opensource free Nexus WP framework supporting front-end editing, custom layout and drag & drop.
0 66 posted 7 years ago by barkgj
WordPress, IIS, Permalinks and index.php | Richard Shepherd
0 45 posted 7 years ago by thesmu
Disable (remove) some sidebars, or widgets at all in **Wordpress** on page template with suffix in the template name (*-no-widgets.php, *-no-sidebars.php)
1 65 posted 7 years ago by Internet-Uzver
To solve an issue for a blog main page in wordpress to display the latest post in its entirety and the remaining posts only the excerpt.
1 46 posted 7 years ago by rickahontas
A simple widget for displaying a single post in a dynamic sidebar. Originally developed to accommodate a WP user who wanted full control of which posts were displayed and what order they were on a certain page.
0 57 posted 7 years ago by chasecrawford
Use below SQL code and replace references within the theme files.
0 64 posted 7 years ago by ihatetomatoes
Use this plugin: http://wordpress.org/extend/plugins/members/ Settings are here: http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types http://codex.wordpress.org/Function_Reference/register_post_type Gravity Fo...
0 59 posted 7 years ago by ihatetomatoes
This adds custom columns to a custom post type
0 86 posted 7 years ago by bitsculptor
Easy PHP script for uploading and unpacking zip files to the server much faster Steps to follow: 1. create folder on the webserver called "zipper" or something else 2. copy the following PHP code into a file called "zipper.php" into this folde...
2 524 posted 7 years ago by jvandemerwe
Populate Fields from Post Data Add this to functions.php
0 50 posted 7 years ago by paddy1228
Thanks Dan Gayle. http://www.dangayle.com/import-feeds-wordpress-fetch-feed/
2 86 posted 7 years ago by adambundy
Add an ID to the body tag.
0 70 posted 7 years ago by almendro
[register_nav_menus](http://codex.wordpress.org/Function_Reference/register_nav_menus,"register_nav_menus") [wp_nav_menu](http://codex.wordpress.org/Function_Reference/wp_nav_menu,"wp_nav_menu") [in_category](http://codex.wordpress.org/Function_Ref...
0 81 posted 7 years ago by hell0world
So, you define a couple of fake funcs and require WP database config, after this you can require wp-db.php, create new wpdb and use it independency of WP for your ajax actions.
0 76 posted 7 years ago by Zayac
Add the following code to functions.php 1: WP backend 2: Appearance -> Editor 3: functions.php
0 66 posted 7 years ago by hell0world
This is some code using Thematic Child Theme overrides to remove thematic's post thumbnails and add Post Thumbnails outside of the .entry-content <div> so that POst Thumbnails can be styled separated from all post Meta. See this page for an example...
0 69 posted 7 years ago by AndrewThinkUp
1 2 3 4 5 6 ... 44