Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 2 3 4 5 6 7 ... 43
Add this to functions.php and then you can call the focus keyword anywhere you want with: <?php wpseoFocusKW();?>
0 822 posted 11 years ago by itsmrchris
Add to functions.php. Replace IDs (64, 104 below) with categories you want to exclude.
1 723 posted 11 years ago by adambundy
How to insert the less preprocessor script in WordPress Websites and Blogs
0 665 posted 11 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 522 posted 11 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 655 posted 11 years ago by FatFolderDesigner
This allows you to change the logo, title text, and url for the login logo in wordpress.
1 791 posted 11 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 786 posted 11 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 542 posted 11 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 660 posted 11 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 648 posted 11 years ago by SmashArtist
This will show you what template you are currently viewing (index.php, page.php)
0 661 posted 11 years ago by bitsculptor
This allows you to change the post updated message that wordpress automatically inserts.
0 788 posted 11 years ago by bitsculptor
Función php para reemplazar palabras dentro de los post de WordPress.
0 603 posted 11 years ago by maiden
This script downloads the latest version of WordPress to your site rather than having to use FTP.
1 397 posted 11 years ago by nathan_roberts
Add HTTP Header to Wordpress (ex: Vary: User-Agent)
0 846 posted 11 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 839 posted 11 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 626 posted 11 years ago by ecksteing
Wordpress Custom Post Type, custom taxonomy and queries
0 656 posted 11 years ago by SidFerreiraZ
Snippet to show a simple use of the transient API when querying posts.
0 637 posted 11 years ago by Mat_
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
0 830 posted 11 years ago by shin
Displaying your latest tweets is a good way to encourage people to follow you on Twitter. The most common place to display tweets is in the sidebar, although you can add them to any area of the website.
0 776 posted 11 years ago by i-am-andy
second level of categories (when offset=-1 doesn't work, like for "get_category_link()"), pictures must be called exactly like category slug and placed to "catimg" folder. also i used "substr" for cut decription (314 symbols but you can change it). U...
0 505 posted 11 years ago by shin
<?php>
1 452 posted 11 years ago by Amistyle
Get Wordpress wp_get_archives for a specific category... by default it sghows all categorys
0 1202 posted 11 years ago by i-am-andy
Place the function in your functions.php file of your theme... Then, simply call like this: wp_paginate('', 3); The first param is optional, the second dictates how many pages before and after the current page link will show...
0 550 posted 11 years ago by thewickedchemist
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 3
0 657 posted 11 years ago by ecksteing
The awesome Geo Mashup Plugin for WordPress allows for auto-embedding a map showing the location of the Post, Page etc via Shortcode or adding a line of PHP into the Theme file/s. The code below, added as a Plugin, will make a map appear at the en...
0 720 posted 11 years ago by ecksteing
//This will grab taxonomies three levels deep (parent, child, grandchild) and display them //in an accordion fashion. Parent is the header, then child with a checkbox, if checked, will //display grandchild taxonomies. //Uses jQuery Accordion (do...
0 605 posted 11 years ago by dnnsldr
1 2 3 4 5 6 7 ... 43