Create Named Templates in WordPress

The basic WordPress template files that make up a standard WordPress theme are: index.php, header.php, footer.php, sidebar.php, and style.css. The WordPress theme engine is flexible and gives you several ways of using templates and tags to pull different types of content from your database to display on your website.


After you create a simple theme using the standard templates, there are options available to extend the standard functionality of WordPress so that you have the flexibility to quickly address specific needs for your website.


WordPress recognizes three special areas of a theme: header, footer, and sidebar. The get_header, get_footer, and get_sidebar functions default to loading header.php, footer.php, and sidebar.php, respectively. Each of these functions also supports a name parameter that allows you to load an alternate version of the file. For example, running get_header('main') causes WordPress to load header-main.php.


You may wonder why you’d use the name parameter when you can just create a template file named whatever you like and load it directly. The following are reasons for using the get_header, get_footer, or get_sidebar functions with a name parameter:



  • You use a standard naming convention that users can easily recognize and understand.



  • You can load specialized template files easily and quickly.



  • You offer a fallback that loads the unnamed template file if the named one doesn’t exist. For example, if you use the tag get_header('main'); in your template, but for some reason the header-main.php template file does not exist, WordPress defaults to header.php, which saves the integrity of your website display until you can load the header-main.php file correctly.




In short, use the name parameter feature if you have multiple, specialized Header, Footer, or Sidebar template files.


When you duplicate sections of code in numerous template files, place the code in a separate file and use the get_template_part function to load it where needed.




dummies

Source:http://www.dummies.com/how-to/content/create-named-templates-in-wordpress.html

How to Enable the Firewall in Lion Server

You use Server Admin to configure a firewall on Lion Server. Using Server Admin to configure a firewall is actually easy. You can click to select services to allow through the firewall, as well as add your own services and ports, such as those used by third-party server software. Server Admin also enables you to create new rules for allowing or blocking ports.


Before you can configure the firewall, you have to enable the firewall service. In Server Admin, the procedure is the same as with other services:



  1. Open Server Admin and select the server in the left column.



  2. Click the Settings icon in the toolbar and then click the Services tab.



  3. Select the Firewall check box and then click the Save button.




As with other services, you also need to start it to get it running:



  1. In Server Admin, click the triangle next to your server in the left column to expand the list of services.



  2. Select Firewall from the list.



  3. Click the Start Firewall button in the lower left.




You can now stop the firewall by clicking the same button, which changes to Stop Firewall. With the firewall stopped, all incoming traffic is allowed.











dummies

Source:http://www.dummies.com/how-to/content/how-to-enable-the-firewall-in-lion-server.html