Jun 02

Update: I have added instructions below on hiding sub-pages from the navigation menus as well.

I spent a little time tonight looking over several WordPress blog themes/skins and noticed that several of them create a site-wide navigation on the blog based on the pages that the user creates in the WordPress admin section.

This is a great feature and saves tons of time from having to hard-code buttons that link to your pages.

Hiding Pages from the Nav

Tutorial Level of Difficulty: Medium

What if you want to hide a pages from the nav? How can you hide a page so it doesn’t become a nav button automatically?

Here’s how (NOTE: the colors don’t matter, they are just added to show the different sections of code in the explanation).

1. In the Wordpress theme editor, open up the header.php file and find the following line:
<?php $children = wp_list_pages(’sort_column=menu_order&depth=1&title_li=’);?>

2. We will be adding the following bit of code after the last ‘=’ sign:
&exclude=

3. Now the code should look like this (colors are just for display purposes):
<?php $children = wp_list_pages(’sort_column=menu_order&depth=1&title_li=&exclude=‘);?>

4. Now, all you have to do is add the page ID numbers that you want to hide after the ‘&exclude=’… make sure to separate with commas.

Example: If I wanted to hide page ID’s 1, 2 & 3 from the nav then the code would look like this:
<?php $children = wp_list_pages(’sort_column=menu_order&depth=1&title_li=&exclude=1,2,3‘);?>

(note: commas are used to separate page ID’s, but if you are only entering a single ID instead of several then you will not need to add a comma)

Hiding sub-pages (Pages that are assigned to a ‘Parent Page’)

1. If you want to hide a sub page, scroll down to the bottom of the same file (header.php) and find the following bit of code:

<div id=”subnav”>
<ul>

<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=&child_of=’. $parent_id); ?>
</ul>
</div><!– /sub nav –>

2. Directly after the part that says &title_li= add:

&exclude=

3. Now, all you have to do is add the page ID numbers that you want to hide after the ‘&exclude=’… make sure to separate with commas.
Example: If I wanted to hide sub-page ID 47 and 117 from the sub-nav then the code would look like this:

<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=&exclude=47,117&child_of=’. $parent_id); ?>

(note: commas are used to separate page ID’s, but if you are only entering a single ID instead of several then you will not need to add a comma)

How can I find my page ID’s?
By default, WordPress blogs create links for the pages you add. These links are each given a unique ID found in the URL. You can either use your browser or the WordPress ‘Manage Pages’ admin section to browse to a page you have created and copy/paste the ID’s into the code we just made.

What if I am using text links (pretty permalinks) instead of page IDs?
You can still find the page ID for each page by mousing over each page link in the ‘Manage Pages’ section of your WordPress admin.
The status bar is the bottom bar in your browser that displays the hyperlink when you mouse over a link on a page.
Don’t see the status bar? Turn it on by opening up your browser and going to View, click on ‘Status Bar’ if there isn’t already a check mark next to it.
Now that the status bar is turned on, go back to your WordPress admin and navigate to Manage > Pages, and mouse over the links to the pages that you would like to hide from the nav. The status bar will show the original hyperlink to that page including the page ID (look for the part of the link that says ‘ID=’ … the ID is the number that follows the ‘=’ sign).

Hiding pages came in helpful for me recently, hopefully a few of you find it useful as well.

This has been successfully tested on the following blog themes:

Has it worked on your theme? Leave a comment and I’ll add it to the list.

written by socialplasm \\ tags: , , , , ,

May 24
Old Skool

Recently I wrote about how many programmers would kill for the ability to work uninterrupted by clients.

Well, the flip-side of that is that not all business-type people think that working with developers is a walk down happy time lane either.

The truth is that there are distinct types of personalities that fit the role of programmer/developer and there are certain character traits that make up the general population of business-type people; both sides have exceptions to the rule, of course. But the generalizations do hold some water.

Fact of the matter? Most business people don’t have the time to learn the ins-and-outs of Microsoft Word let alone what it takes to put together a website. Most don’t have the capacity to learn to speak in one’s and zero’s; we’re talking about specialized skills on both sides of the line.

‘Tech’ was out of reach for many … until now

There has been a drastic change in the accessibility of web development since the introduction of blogging technology.

Blogs enabled anyone to have a presence on the web. Shortly after the concept took off, companies like WordPress made it even easier for those less technically inclined to get in the game.

WordPress and other content management systems (CMS’s) made it very easy to bridge the gap between having to know how to program and wanting to have a web presence.

In addition to the technology being easy for public consumption, many in the development world realized that there was a whole new niche of development to be had; develop programs open-source and give them away. The return for the programmer? High levels of visibility, access to new and unique projects and jobs based on the business community’s interaction with your free and accessible plugins and applications and a new working environment; a client-free development model.

What Does this Mean for the Non-Programmer?

The majority of the people in the blogging community are just regular people; not uber-geeks who can create things out of one’s and zero’s.

How did they get started? How do they make it look like they know how to build a website?

Here’s a recipe for building a FREE website:

  1. Go and sign up for a WordPress account. A WordPress account will set you up with your own, free, easy to manage website.
  2. Make it pretty by choosing a new theme for it. A theme is a fast and free way of ’skinning’ your site with a new look and feel. Log into your free wordpress account and you can search and install any one of thousands of free themes.
  3. Log in start and writing blog posts.
  4. There you go! You have a FREE Internet presence!

Thanks, but I am a little more motivated. I want my site to Rock!

Ok, read on…

written by socialplasm \\ tags: , ,

May 23

I know many programmers who confess that the best business opportunity they could imagine would be one where they weren’t constantly bothered by their clients.

I don’t build in order to have clients. I have clients in order to build.
-Ayn Rand

Enter, a new business relationship: coding for open source platforms. That’s right, programmers that have caught on to the vision that if they write code, plugins, themes or other elements for platforms such as WordPress … for free … that they actually make as much money, if not more, as they would working on a more transactional client-based list of projects.

Old Skool

The old school model of development projects for clients (client approaches developer, developer does work, client pays for work) is still strong, and probably won’t go away any time soon. This new client-free model can supplement, and in some cases, completely replace the project-to-project routine that many programmers and developers find themselves in.

Old Skool

The Programmer’s Pay-off

Here are 10 steps to how the new method of developing free or low-cost projects for the open source community can impact a programmers pocket book. We’ll use programming a free plugin for WordPress as an example:
  1. (Identify) Programmer sees a need within the WordPress blogging platform
  2. (Contribute)Programmer takes 3 hours on a Tuesday night and writes a nifty plugin for use within the WordPress community to fill the need
  3. (Announce) She posts it on WordPress’ page to let the community know it’s out there and available for download
  4. (Distribute) She creates a page on her own blog, puts the plugin on there for download
  5. (Communicate) She goes out to the communities where she can tell people that her plugin can fill their needs
  6. People follow her links back to her blog and download the plugin
  7. Over a short bit of time the plugin gains some traction and a community of users and supporters is built
  8. As a result, businesses contact her about writing a similar app, with some tweaks, for their internal website
  9. She contacts them and provides a proposal
  10. Project approved, she takes the check to the bank
This type of development means that a developer can program something once and have the influence felt more wide-spread than if they were to develop ‘for’ an individual entity.
Old Skool
It may seem like an over-simplification of the process; ‘build it once, benefit the masses’ … but the idea is that by contributing and distributing in small, measured efforts to the open source community, or pro-bono for a widely-used platform like WordPress, your mad skillz have the potential to gain exponential visibility amongst those that are looking for good developers for their own projects.
Additionally, your free plugin may become the ‘lite’ version of a more robust plugin or app that you choose to build down the road based on the success of the free version.

written by socialplasm \\ tags: , ,