Welcome To Snipplr
Everyone's Recent Snippets Tagged wordpress
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Add this to the functions.php file. Make sure the Admin Bar is set to show when viewing site. You will see in the Admin Bar the current page template that is being used.
0
803
posted 13 years ago by jeremyjared74
Usage:
<?php>post_excerpt; if($textin == ""){ $textin = $post->post_content; } echo TruncateText($textin, 150); ?>
0
648
posted 13 years ago by tcelestino
Useful snippet for getting a specific number of posts from a specific category, useful for news listing in sidebar
0
700
posted 13 years ago by i-am-andy
Instead of requiring the loop.php file in your custom themes you can use there two functions, placed in your functions.php file to not only automatically include it, but make a dead simple to filter sections out on a page by page basis negating the n...
0
714
posted 13 years ago by FatFolderDesigner
WordPress allows you to embed videos so easily using oEmbed. You can easily add videos to your post just pasting their URL to your post. WordPress handles all the object and embed HTML for you. But this code is missing wmode parameter which is necess...
0
828
posted 13 years ago by paulgrenwood
Useful for WordPress installations that need more than 32M of memory
0
997
posted 13 years ago by Huskie
Allows you to change the name of the "Posts" module within the admin section of WordPress.
0
723
posted 13 years ago by jamiebrwr
In case you need to create your own listing of the last # of trailing months of Archived Wordpress Articles. This one is being used to pull the info onto a Magento page.
0
792
posted 13 years ago by cpres
add this to functions.php and you won't have to mess with the index page.
0
852
posted 13 years ago by cpres
There are a few modifications to make to your WP files to share a single database between multiple installs on separate domains.
0
628
posted 13 years ago by lancemonotone
Good for showing labels/descriptions that accompany custom fields when they are set, and avoiding lots of empty labels.
Eg: if there is no content set in the 'project-agency' field, don't show the label 'Agency:', but if there is, show it with the...
0
804
posted 13 years ago by wahnbriefe