Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 2 3 4 5 6 7 ... 44
I am using thesis developer version to redesign the site [FFXIV Gil](http://www.cheapffxivgils.com/ "Cheap FFXIV GIL"). Before using the code, you should add the Unique Hook Name to BOX in template(see [the official tutorial](http://diythemes.com/t...
0 57 posted 7 years ago by hell0world
Create navigation links without the need of a plugin, using paginate_links function of wordpress core.
0 65 posted 7 years ago by rudwolf
Adding this snippet to the functions.php of your wordpress theme will restrict wp-admin access to certain users as defined at http://codex.wordpress.org/Roles_and_Capabilities And also still allows for user access to admin-ajax.php , async-uplo...
0 70 posted 7 years ago by jsmithies
This PHP removes menu items from the WordPress dashboard
0 57 posted 7 years ago by ecksteing
goes in the functions file
0 78 posted 7 years ago by thesmu
A function to upload an image to the media library and set it as featured image of a post. It requires 2 params. The name of the upload field and of course the post ID. This function is part of the WPelements library class available on Github. Fee...
0 95 posted 7 years ago by krike
Thanks to @kaiser on WP answers for this. Place this function in your functions.php file, then use it in your template with the function call like: wpse19316_author_comments( 100 );
1 61 posted 7 years ago by adambundy
display an image field in the body/page of a custom post type
0 74 posted 7 years ago by mktimes5
Add this to functions.php and then you can call the focus keyword anywhere you want with: <?php wpseoFocusKW();?>
0 70 posted 7 years ago by itsmrchris
Add to functions.php. Replace IDs (64, 104 below) with categories you want to exclude.
1 60 posted 7 years ago by adambundy
How to insert the less preprocessor script in WordPress Websites and Blogs
0 73 posted 7 years ago by ecksteing
In this example it checks to see if the page it is on has an ACF named page_title, if so - display it as an H1, and if not, display the WP default page title as the H1
0 42 posted 7 years ago by itsmrchris
It's a 3 part process, first is the PHP that you need to run, which includes the appropriate scripts and styles into the admin header, then you need an html button and input field to put the stored value in, then you need some jQuery to open the popu...
0 73 posted 7 years ago by FatFolderDesigner
This allows you to change the logo, title text, and url for the login logo in wordpress.
1 95 posted 7 years ago by bitsculptor
This gives the code for creating a custom post type with all the necessary labels and even custom message support, and it gives the code for a custom taxonomy with that post type.
0 89 posted 7 years ago by bitsculptor
Función php para mostrar el número total de entradas o post de una determinada categoría en WordPress
0 61 posted 7 years ago by maiden
All you need to do is create a child theme, and create a new comments.php file inside that child theme. Then insert this code into the comments.php file you just created;
2 62 posted 7 years ago by jhkoning
This creates a custom page template designed to run a Facebook photo contest utilizing the Facebook like button and uses Wordpress featured images for each post in a grid. This setup requires the following: - iLoveIt Wordpress Theme - Creat...
0 69 posted 7 years ago by SmashArtist
This will show you what template you are currently viewing (index.php, page.php)
0 71 posted 7 years ago by bitsculptor
This allows you to change the post updated message that wordpress automatically inserts.
0 81 posted 7 years ago by bitsculptor
Función php para reemplazar palabras dentro de los post de WordPress.
0 57 posted 7 years ago by maiden
This script downloads the latest version of WordPress to your site rather than having to use FTP.
1 47 posted 7 years ago by nathan_roberts
Add HTTP Header to Wordpress (ex: Vary: User-Agent)
0 97 posted 7 years ago by dataworx
Suppose you wanted to check if a user was viewing a singular post with the post type of testimonial. You can use the next code sample to perform this check.
0 84 posted 7 years ago by i-am-andy
This PHP adds the style.css of the active Theme to the WordPress TinyMCE Post and Page editor.
0 90 posted 7 years ago by ecksteing
Wordpress Custom Post Type, custom taxonomy and queries
0 66 posted 7 years ago by SidFerreiraZ
Snippet to show a simple use of the transient API when querying posts.
0 66 posted 7 years ago by Mat_
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
0 78 posted 7 years ago by shin
1 2 3 4 5 6 7 ... 44