Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This help you cutting text without cut the last word. Any feedback appreciated!
0
487
posted 13 years ago by alesma
his code will show the child pages, and only the child pages, when on a parent or on one of the children.
This code will not work if placed after a widget block in the sidebar.
1
696
posted 13 years ago by raz
I thought this was pretty elegant code and wanted to share it with anyone who found it useful.
0
654
posted 13 years ago by mattneary
// example <br>
$from = '2011-1-6'; <br>
$to = '2011-1-8'; <br>
dateDiff($from,$to); // returns 2
1
761
posted 13 years ago by klovera
PHP
How to obtain current page permalink url from a function on call on a page template and not from inside the Loop?
I got the answer to this question on WordPress Stack Exchange website:
http://wordpress.stackexchange.com/questions/6931/is-there-a-wordpress-function-that-i-can-use-to-retrieve-the-current-page-that-is
0
1189
posted 13 years ago by racl101
Use this to get the name of the custom taxonomy. Note that this only returns the name of the first selected item, but since this returns an array, use a foreach loop to find all names.
0
847
posted 13 years ago by ToddSmithSalter
To access a protected or private property, you need to create getter and setter
methods inside the class file.
0
489
posted 13 years ago by shinokada