Pippin's Pages http://pippinspages.com { Coding everyday keeps the bugs away } Wed, 08 Sep 2010 21:25:45 +0000 en hourly 1 http://wordpress.org/?v=3.0.1 Check if Current Page is in Tree http://pippinspages.com/tutorials/check-if-current-page-is-in-tree/ http://pippinspages.com/tutorials/check-if-current-page-is-in-tree/#comments Wed, 08 Sep 2010 21:25:45 +0000 Pippin Williamson http://pippinspages.com/?p=1609

This is a really useful little snippet I found in the WordPress Codex. It allows us to check whether a page is within a specified tree, e.g. whether a page is a certain ID or if it is a subpage of that ID.

Here’s the function:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function is_tree($pid)
{
	global $post;         // load details about this page
	$anc = get_post_ancestors( $post->ID );
	foreach($anc as $ancestor) {
		if(is_page() && $ancestor == $pid) 
		{
			return true;
		}
	}
	if(is_page()&&(is_page($pid))) 
               return true;   // we're at the page or at a sub page
	else 
               return false;  // we're elsewhere
 
}

Then we can perform the check from within the WordPress loop like this:

1
2
3
4
if ( is_tree('4') )
	{
		// run this code
	}

The above snippet will check if the current page has an ID of 4 of if the parent of the current page has an ID of 4. If the check comes back true, the code within the brackets will be run.

]]>
http://pippinspages.com/tutorials/check-if-current-page-is-in-tree/feed/ 0
WP Utility Short Codes Plugin – Free http://pippinspages.com/freebies/wp-utility-short-codes-plugin-free/ http://pippinspages.com/freebies/wp-utility-short-codes-plugin-free/#comments Mon, 30 Aug 2010 00:20:07 +0000 Pippin Williamson http://pippinspages.com/?p=1580

This plugin lets you very easily insert utility boxes and buttons, which can be used for any number of things, such as drawing your visitors to important information. For example, download links.

View Live Demo

Download

WP Utility Short Codes Plugin (29) ]]>
http://pippinspages.com/freebies/wp-utility-short-codes-plugin-free/feed/ 4
Minimum Word Count for WordPress Posts http://pippinspages.com/tutorials/minimum-word-count-for-wordpress-posts/ http://pippinspages.com/tutorials/minimum-word-count-for-wordpress-posts/#comments Fri, 27 Aug 2010 02:09:11 +0000 Pippin Williamson http://pippinspages.com/?p=1575

If you wish to set a minimum word count for your posts (this can be useful for a variety of things, including maintaining a clean layout), simply add the following snippet to your functions.php file and set the number to whatever you wish.

1
2
3
4
5
6
7
8
function minWord($content)
{
	global $post;
	$content = $post->post_content;
	if (str_word_count($content) < 100 ) //set this to the minimum number of words
	wp_die( __('Error: your post is below the minimum word count.') );
}
add_action('publish_post', 'minWord');

If an author tries to publish a post with fewer than the minimum, WordPress will kick out an error.

Nice and simple.

]]>
http://pippinspages.com/tutorials/minimum-word-count-for-wordpress-posts/feed/ 0
Simple Utility Icons – Free http://pippinspages.com/freebies/simple-utility-icons-free/ http://pippinspages.com/freebies/simple-utility-icons-free/#comments Sun, 22 Aug 2010 20:30:33 +0000 Pippin Williamson http://pippinspages.com/?p=1571

These are a simple set of 6 20×20 icons I came up with the other day while working on a new WP plugin, and thought I’d give them out to everyone for free.

You are free to use them anywhere you like, including commercial projects, as long as you give credit to me.
Utility Icons (14)

]]>
http://pippinspages.com/freebies/simple-utility-icons-free/feed/ 2
Simple Share – Easy Social Sharing http://pippinspages.com/wordpress/simple-share-easy-social-sharing/ http://pippinspages.com/wordpress/simple-share-easy-social-sharing/#comments Tue, 10 Aug 2010 15:50:18 +0000 Pippin Williamson http://pippinspages.com/?p=1564

Simple Share WordPress plugin

Simple Social Network Sharing for WordPress

Simple Sharing is an easy to use social network sharing plugin that adds a “share” box to each of your individual posts, allowing your readers to easily share your post over many of the most popular social sharing networks.

But What’s Different from Others

Unlike many social network sharing plugins, Simple Share floats just to the left of your content and scrolls with the page as readers scroll, keeping it always in view.

Why does this matter?

Readers have a tendency to quit reading before they get to the bottom of the post, where most social network sharing links are. Simple Share is always in view, enticing readers to share your article from the first word on.

Features

  • 8 integrated sharing protocols
  • Easy to use admin interface
  • Complete positioning control
  • Styling control
  • Ability to choose which protocols to display
  • jQuery enhanced fancy tool tips

Icons by Icon Dock.

Download on Code Canyon

]]>
http://pippinspages.com/wordpress/simple-share-easy-social-sharing/feed/ 0
Full IE Support in WordPress Font Uploader v1.2 http://pippinspages.com/wordpress/full-ie-support-in-wordpress-font-uploader-v1-2/ http://pippinspages.com/wordpress/full-ie-support-in-wordpress-font-uploader-v1-2/#comments Mon, 26 Jul 2010 21:19:34 +0000 Pippin Williamson http://pippinspages.com/?p=1538

Font Uploader v1.2

I’m pleased to announce that my premium WordPress Font Uploader plugin now has full support for fonts in Internet Explorer.

100% Cross Browser Compatible Fonts

This means that you can now display any font anywhere you like on your website, while being assured that it will work no matter what browser your site visitor is using.

Check out the screencast below for a demonstration of this new feature.

Convert your fonts

To convert your fonts to a .eot, readable by Internet Explorer, use the link below:
Sebastian Kippe’s .ttf -> .eot converter

]]>
http://pippinspages.com/wordpress/full-ie-support-in-wordpress-font-uploader-v1-2/feed/ 4
Restricted Content Plugin – Free http://pippinspages.com/freebies/restricted-content-plugin-free/ http://pippinspages.com/freebies/restricted-content-plugin-free/#comments Thu, 22 Jul 2010 06:04:28 +0000 Pippin Williamson http://pippinspages.com/?p=1524

Restrict content to registered users

This plugin will very easily let you restrict content on your WordPress site to registered users. It permits you to restrict entire posts / pages or individual sections of content within a post or page.

Screencast Demo

Features

  • Restrict entire posts / pages.
  • Restrict sections of content.
  • Unlimited number of restricted areas.
  • Four restriction levels – uses WordPress’s regular user levels.
  • Hide content displayed in WordPress feeds.

Usage

First upload to wp-content/plugins and click activate from the WordPress plugins menu.

To restrict an entire post or page, simply select the user level you’d like to restrict the post or page to from the drop down menu added just below the post/page editor.

To restrict just a section of content within a post or page, you may use shortcodes like this:

[restrict userlevel="editor"] . . . your restricted content goes here . . . [/restrict]

Accepted userlevel values are:

  • admin
  • editor
  • author
  • subscriber

A premium version of this plugin is coming soon with many more awesome features.

Changelog

Updated July 23, 2010

Version 1.1 fixes a problem where all posts would be set to “restricted” even without a restriction level set. This problem was caused the value of “none” not automatically being inserted into the database. I have changed the way that the plugin perceives whether a restriction level is set, eliminating this problem entirely.

Download for Free

Hit the download link be low and leave a comment at the bottom.

Restricted Content Plugin (104) ]]>
http://pippinspages.com/freebies/restricted-content-plugin-free/feed/ 16
Premium WordPress Announcements Plugin http://pippinspages.com/wordpress/premium-wordpress-announcements-plugin/ http://pippinspages.com/wordpress/premium-wordpress-announcements-plugin/#comments Sat, 17 Jul 2010 13:57:21 +0000 Pippin Williamson http://pippinspages.com/?p=1520

Easily create Announcements to send out through your WordPress website.

This plugin will make it extremely easy to create announcements pertaining to meeting times, bug fixes, feature updates, event planning, and anything else!

Features

  • Manage Announcements with the WordPress post editor
  • Categorize Announcements
  • Recent Announcements Widget
  • Announcement Categories Widget
  • WordPress shortcodes for easy Announcement listing on any page
  • Multiple display options
  • “Additional Details” display
  • Works natively with any WordPress theme
  • Easy to customize to fit your theme just right
  • Detailed screencast and documentation

If you’ve been looking for an easy way to manage your announcements, this is it.

Once you’ve tried it, you will hardly believe how easy it is to make announcements about your software’s new features, or your new theme file available for purchase, or your new meeting times, or just about anything else you can think of.

Check out a live demo

Download from Code Canyon.net

]]>
http://pippinspages.com/wordpress/premium-wordpress-announcements-plugin/feed/ 0
WordPress Font Uploader v1.1 – New Features http://pippinspages.com/wordpress/wordpress-font-uploader-v1-1-new-features/ http://pippinspages.com/wordpress/wordpress-font-uploader-v1-1-new-features/#comments Wed, 14 Jul 2010 00:34:13 +0000 Pippin Williamson http://pippinspages.com/?p=1513

The new version of my premium WordPress Font Uploader plugin will be available anytime over at Code Canyon.net.

This new version includes some really cool updates.

Feature Updates

  • Full support for Google Fonts, available from http://code.google.com/webfonts
  • Lots of efficiency updates. The new version outputs much less unnecessary code.

The Google Font capability provides full 100% cross browser support, including Internet Explorer. With this update, you will be able to display your custom fonts to ALL users.

Check out the screencast below for a demo of this update.

Download from Code Canyon

]]>
http://pippinspages.com/wordpress/wordpress-font-uploader-v1-1-new-features/feed/ 0
Sliding Contact Form for WordPress http://pippinspages.com/wordpress/sliding-contact-form-for-wordpress/ http://pippinspages.com/wordpress/sliding-contact-form-for-wordpress/#comments Fri, 09 Jul 2010 06:17:59 +0000 Pippin Williamson http://pippinspages.com/?p=1470

This is an elegant solution that puts a “sliding contact panel” on your WordPress site.
It will put a small “Contact” tab in the top left corner that expands to show a contact form and social media links when clicked.

Features

  • jQuery powered sliding contact panel
  • jQuery email validation
  • 15 Social network icons integrated
  • 5 color schemes
  • CSS 3 for lightning quick loading—no images harmed in production
  • Graceful degradation for non-CSS3 browsers
  • Easy to use admin panel
  • Custom logo capability

Version 1.1 Updates

Fixed some small css bugs that caused conflicts with some theme’s clearfix classes.

View Demo

Download from CodeCanyon

]]>
http://pippinspages.com/wordpress/sliding-contact-form-for-wordpress/feed/ 3