Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged page



1 2 Next »
0 1211 posted 15 years ago by jli
This function build page navigation links.\r\nParameters legend:\r\n- $items = total number of rows to be paginated\r\n- $perpage = how many rows to be displayed on a page\r\n- $maxlinks - how much page links to be build and shown for navigation ( <...
0 1109 posted 15 years ago by stz184
Appends a custom more-link to all excerpts, regardless of whether they're auto-generated or pulling manual excerpts from the excerpt field. Note: Automatic excerpts still show the default […] at the end (before the more-link). Found here: http:/...
1 1188 posted 15 years ago by hussong
1 1344 posted 15 years ago by bobbym245
Adds support for excerpts in WordPress pages. Great for using WordPress as a CMS. A text field appears in the admin panel and you can pull the excerpt from your template files (for teaser texts etc.)
0 1196 posted 15 years ago by hussong
Returns the page object of the parent of the current page.
0 1462 posted 15 years ago by levinet
Returns the post or page id using the name/slug of a page.
2 4136 posted 15 years ago by levinet
0 1093 posted 15 years ago by K2Joom
4 5776 posted 16 years ago by traeregan
Ever needed to get the page your user is currently viewing? This can be done quickly in php all thanks to $_server.
3 1233 posted 16 years ago by scopefragger
There's no has\_children() function in WP 2.8.4, but get\_children() returns false if the post/page has no children, so it can serve the same purpose in a page template. Outside a page template you'd have to add a global declaration for the $post...
2 1587 posted 16 years ago by cyberhobo
0 1181 posted 16 years ago by sinecera
If you leave out the "paged" parameter, the same results are queried and shown on each pagination. Of course, you'll want to change the "3" to whichever category you'll want to exclude.
3 1694 posted 16 years ago by rocktronica
0 1081 posted 16 years ago by sinecera
0 1014 posted 16 years ago by sinecera
0 1105 posted 16 years ago by sinecera
2 1455 posted 16 years ago by sfjalar
The basis to a spider.
5 1840 posted 16 years ago by Unreal
3 2003 posted 16 years ago by jimmysessions
Better way to echo a .current_page_item class on a list nav.
3 1407 posted 16 years ago by davebowker
1 2 Next »