Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged wordpress
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Add this to functions.php and then you can call the focus keyword anywhere you want with:
<?php wpseoFocusKW();?>
0
1192
posted 12 years ago by itsmrchris
Add to functions.php. Replace IDs (64, 104 below) with categories you want to exclude.
1
1048
posted 12 years ago by adambundy
How to insert the less preprocessor script in WordPress Websites and Blogs
0
948
posted 12 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
802
posted 12 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
960
posted 12 years ago by FatFolderDesigner
This allows you to change the logo, title text, and url for the login logo in wordpress.
1
1091
posted 12 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
1149
posted 12 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
806
posted 12 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
1013
posted 12 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
951
posted 12 years ago by SmashArtist
This will show you what template you are currently viewing (index.php, page.php)
0
997
posted 12 years ago by bitsculptor
This allows you to change the post updated message that wordpress automatically inserts.
0
1134
posted 12 years ago by bitsculptor
Función php para reemplazar palabras dentro de los post de WordPress.
0
897
posted 12 years ago by maiden
This script downloads the latest version of WordPress to your site rather than having to use FTP.
1
593
posted 12 years ago by nathan_roberts
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
1200
posted 12 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
892
posted 12 years ago by ecksteing
Snippet to show a simple use of the transient API when querying posts.
0
976
posted 12 years ago by Mat_
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
0
1141
posted 12 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
1087
posted 12 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
785
posted 12 years ago by shin
Get Wordpress wp_get_archives for a specific category... by default it sghows all categorys
0
1588
posted 12 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
828
posted 12 years ago by thewickedchemist
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
2124
posted 12 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
915
posted 12 years ago by dnnsldr