How to Use Custom Sidebars on Posts and Pages | Wptuts+
This tutorial shows step by step how to add a theme option setting to add your own sidebars to a theme and then be able to apply them from the Page editor. This is much more streamlined than having to a create a separate page template every time you want a page to have a different sidebar.
Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts
Sunday, May 26, 2013
Wednesday, February 16, 2011
Removing specific HTML tags with Regular Expressions
matches start tag of specific tag including attributes
The above expression can be very helpful to strip out unwanted <span> tags.
via: Regular Expressions to strip HTML tags - www.pagecolumn.com
<\s*span.*?>
The above expression can be very helpful to strip out unwanted <span> tags.
via: Regular Expressions to strip HTML tags - www.pagecolumn.com
Tuesday, May 11, 2010
Use variable headers in Wordpress with conditional tags

Conditional Tags (snippet 2) « WordPress Codex
>> See snippet #3 for instructions.
"This is useful for setting variables specific to different sections of a web site, so a different banner image, or a different heading."
Conditional Tags « WordPress Codex
Friday, July 31, 2009
Learning PHP
Ending lines
Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish one set of instructions from another.
Comments
In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.
Variables
When a variable is declared, it can be used over and over again in your script.
Rules for creating variables
A variable name must start with a letter or an underscore "_"
A variable name should not contain spaces. If a variable name is more than one word, it should be separated with an underscore ($my_string), or with capitalization ($myString)
Learning on W3Schools' PHP Tutorial
Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish one set of instructions from another.
Comments
In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.
Variables
When a variable is declared, it can be used over and over again in your script.
Rules for creating variables
A variable name must start with a letter or an underscore "_"
A variable name should not contain spaces. If a variable name is more than one word, it should be separated with an underscore ($my_string), or with capitalization ($myString)
Learning on W3Schools' PHP Tutorial
Subscribe to:
Posts (Atom)