Skip to main navigation
#! code
Code Tips, Snippets, Resources, Tutorials And Help
  • Home
  • Tools
  • About
  • Contact

WordPress

Logging Errors In WordPress

To debug WordPress many sites will tell you to add the WP_DEBUG setting on its own to your wp-config.php file, but this can be quite harmful as many server configurations will start showing PHP errors and warning messages on your site pages. Most sites will also log any errors to some form or error log, but this isn't always the best place for them to go.

The Correct Way To Load A Template File In WordPress

Since WordPress 3.0 there has been a funcion called get_template_part(), which has been used quite a bit in the new Twenty Ten default WordPress theme. This is an evolution of the usual way to include parts of themes by using functions like get_header() to include the header.php file. This function helps code resuse by including the same files multiple files, but also allows child themes to override parent themes.

philipnorton42 Sat, 12/18/2010 - 22:39
Extending The WordPress Page Walker

I have looked at printing an intelligent list of WordPress pages in a previous blog post, but I wanted to revisit this topic and use the Walker classes that are part of WordPress. The Walker class is an abstract class that sorts out a lot of the basic functionality needed to extract and render a hierarchical list of items from a database.

philipnorton42 Mon, 11/01/2010 - 13:00
Some Essential WordPress Plugins

I know what you are thinking, but this isn't just another WordPress plugin blog post. I am asked every few weeks what WordPress plugins I would recommend, and I always end up giving a disjointed list of some from the top of my head. So instead of doing this I thought it would be a good idea to write down the plugins I use quite a bit and would recommend other to use. I will also try to add any alternatives (if they exist) to plugins I use.

philipnorton42 Thu, 10/28/2010 - 12:00

WordCampUK 2010: A Review

WordCampUK is an informal 2 day conference and barcamp that centers around using, working with and developing in WordPress. This year's WordCampUK was held in Manchester and so being local I could hardly miss the opportunity to attend. It was a great event, with great talks and lots of friendly people who were really enthusiastic about WordPress.

Custom Post Types In WordPress 3.0

This article relates to WordPress 3.0. Much of the code posted here won't work on previous versions and some of the information may change in newer versions.

WordPress already comes with five different content types built into the system.

Posts

This is the standard content type and is generally the most used in a blog install. Posts tend to be aggregated onto pages but this is not always the case.

Wordpress Category Post List

A friend of mine asked me to write a Wordpress function the other day that printed out a list of categories and any posts in those categories, along with any meta data that might be in the post.

All the function does is to get a list of categories and then for each category get a list of the posts associated with that category. Not much really, but useful in some circumstances.

philipnorton42 Thu, 06/24/2010 - 17:25

Wordpress 3.0 Released!

It's been a while in the making but yesterday saw the release of the latest major version of Wordpress. I had a feeling it would be pretty soon as there as the final release candidate (RC3) was released last week. You can the Wordpress 3.0 download page below:

Download Wordpress 3.0

Wordpress Dynamic Page Menu Navigation

After writing the function that creates a list of pages that are children of a given page in Wordpress I needed something more robust and automatic. To that end I created a plugin that will create a widget that contains a dynamically created menu of pages.

philipnorton42 Wed, 05/19/2010 - 09:25

Get Child Pages List In Wordpress

It is possible to print out a list of pages in Wordpress, but these functions are designed to print from the root pages to a certain level. I often need to print out a list of pages that are children of the current page being looked at so I created the following function.

Pagination

  • Page 1
  • Next page ››
Subscribe to WordPress

Categories

  • Ansible
  • Apache
  • Book Reviews
  • CSS
  • DOS/Windows
  • Drupal
    • Drupal 8
    • SimpleTest
  • Flex/Flash
  • General
  • Git
  • HTML/XHTML
  • JavaScript
    • JavaScript Strings
    • JavaScript Websites
    • JQuery
    • MooTools
    • OpenLayers
    • Script.aculo.us
  • Linux/Unix
  • MS SQL
  • OSX
  • PhoneGap
  • PHP
    • Phing
    • PHP Arrays
    • PHP Questions
    • PHP Strings
    • PHP Websites
    • Zend Framework
  • PostgreSQL
  • Python
  • Regular Expressions
  • Regular Expressions Websites
  • SQL
    • MS SQL
    • MySQL
    • PostgreSQL
  • Vagrant
  • Websites
  • WordPress

User login

  • Reset your password

© 2019 #! code

  • Twitter
  • Facebook
  • Google+
  • Github
  • RSS
  • Colophon
  • Privacy Policy
  • Terms and License