Welcome To Snipplr
Everyone's Recent Snippets Tagged wordpress
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Try to run Codeigniter in a subfolder of a Wordpress installation and want to remove index.php for clean URLs?
Put this code in a .htaccess file in your codeigniter directory ("cidir" in this example).
0
2244
posted 11 years ago by telltec
Thanks Dan Gayle.
http://www.dangayle.com/import-feeds-wordpress-fetch-feed/
2
1173
posted 11 years ago by adambundy
[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
861
posted 11 years ago by hell0world
In my WP networks, I use a custom 404 page and plugin to answer calls asking for user information from a custom api. The API requires a URL format like this:
domain.com/username/
However, users don't ever type a trailing slash, nor should they, so...
0
1238
posted 11 years ago by lucasoptura
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
930
posted 11 years ago by Zayac
Add the following code to functions.php
1: WP backend
2: Appearance -> Editor
3: functions.php
0
745
posted 11 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
852
posted 11 years ago by AndrewThinkUp
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
714
posted 11 years ago by hell0world
Create navigation links without the need of a plugin, using paginate_links function of wordpress core.
0
1978
posted 11 years ago by rudwolf
Dummy content to format typographic/html tags for Wordpress copy.
0
726
posted 11 years ago by seejaeger
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
665
posted 12 years ago by jsmithies
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
1187
posted 12 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
905
posted 12 years ago by adambundy
The fixed page layout responsive design CSS used in Nexus Themes Framework
0
839
posted 12 years ago by vanseijen
Add this to functions.php and then you can call the focus keyword anywhere you want with:
<?php wpseoFocusKW();?>
0
1029
posted 12 years ago by itsmrchris
Add to functions.php. Replace IDs (64, 104 below) with categories you want to exclude.
1
933
posted 12 years ago by adambundy
How to insert the less preprocessor script in WordPress Websites and Blogs
0
850
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
693
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
842
posted 12 years ago by FatFolderDesigner
This allows you to change the logo, title text, and url for the login logo in wordpress.
1
1003
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
1030
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
711
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
904
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
826
posted 12 years ago by SmashArtist