<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Beautiful Wordpress Themes</title>
	<atom:link href="http://beautifulwordpressthemes.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://beautifulwordpressthemes.com</link>
	<description></description>
	<lastBuildDate>Sun, 22 Apr 2012 16:38:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Responsive WordPress Theme: SquareGrid</title>
		<link>http://beautifulwordpressthemes.com/responsive-wordpress-theme-squaregrid/</link>
		<comments>http://beautifulwordpressthemes.com/responsive-wordpress-theme-squaregrid/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 16:37:20 +0000</pubDate>
		<dc:creator>Dieter</dc:creator>
				<category><![CDATA[Premium Themes]]></category>

		<guid isPermaLink="false">http://beautifulwordpressthemes.com/?p=227</guid>
		<description><![CDATA[SquareGrid is a theme for portfolios and business sites. It has a powerful portfolio template that can show your items in 5 different layouts. It also supports Image (images), Audio and Video (youtube, vimeo). Demo Get Theme]]></description>
			<content:encoded><![CDATA[<p><strong>SquareGrid</strong> is a theme for portfolios and business sites. It has a powerful portfolio template that can show your items in 5 different layouts. It also supports <em>Image</em> (images), <em>Audio</em> and <em>Video</em> (youtube, vimeo).</p>
<p><strong><a title="Theme Demo: Square Grid" href="http://themeton.com/themes/?theme=squaregrid&amp;ref=Dieter">Demo</a> </strong></p>
<p><strong><a title="Responsive WordPress Theme: Square Grid" href="http://themeforest.net/item/squaregrid-fully-responsive-theme-for-portfolio/2189202?WT.ac=category_thumb&amp;WT.seg_1=category_thumb&amp;WT.z_author=themeton&amp;ref=Dieter"> Get Theme</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulwordpressthemes.com/responsive-wordpress-theme-squaregrid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Theme Options in WordPress</title>
		<link>http://beautifulwordpressthemes.com/custom-theme-options/</link>
		<comments>http://beautifulwordpressthemes.com/custom-theme-options/#comments</comments>
		<pubDate>Sat, 21 Apr 2012 16:33:29 +0000</pubDate>
		<dc:creator>Dieter</dc:creator>
				<category><![CDATA[Wordpress Tutorials]]></category>

		<guid isPermaLink="false">http://beautifulwordpressthemes.com/?p=78</guid>
		<description><![CDATA[So you want to add a new layer of customization to your WP theme in order to appeal to more customers or just to make modifications to your theme easier with a front-end system? Well, now you&#8217;ll know how to easily set one of these up inside your theme and take your theme to a new level of usability and usefullness. Step 0: The Principle Behind It All If it [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to add a new layer of customization to your WP theme in order to appeal to more customers or just to make modifications to your theme easier with a front-end system? Well, now you&#8217;ll know how to easily set one of these up inside your theme and take your theme to a new level of usability and usefullness.</p>
<h2>Step 0: The Principle Behind It All</h2>
<p>If it helps you to understand everything we&#8217;re going to be doing in a few seconds, you can think of our &#8220;Theme Opitons&#8221; component of the theme as a plugin that gets activated along with the theme, and since WordPress is gonna use this mindset as well, we&#8217;ll have access to a majority of the same functions that plugins do.</p>
<h2>Step 1: Creating the Menu</h2>
<p>First things first, in order to create our interface to change our options, we need a place to put that interface. &#8220;Where?&#8221; Should be your next question, and the answer is &#8220;In the &#8216;Appearance&#8217; tab of the WP-Admin.&#8221; We&#8217;re going to be creating a submenu under the appearance tab that will hold all of our customizaitons interface.</p>
<p>To make the submenu appear, we need to call the function add_action() and give it the parameters &#8220;admin_menu&#8221;,&#8221;BWPT_theme_options&#8221; in that order. Once we do that, we need to write the function &#8220;BWPT_theme_options&#8221; and fill it with the function add_theme_page() and give it the parameters: &#8216;Manage Theme Options&#8217;, &#8216;Theme Options&#8217;, &#8216;edit_themes&#8217;, &#8216;BWPT_theme_options&#8217;, &#8216;BWPT_theme_options_admin&#8217;.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Custom theme options</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> BWPT_theme_options<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    add_theme_page<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Manage Theme Options'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Theme Options'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'edit_themes'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'BWPT_theme_options_admin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><img class="alignnone size-full wp-image-102" title="1" src="http://beautifulwordpressthemes.com/wp-content/uploads/2010/06/1.jpg" alt="" width="600" height="300" /></p>
<h2>Step 2: Creating the defaults</h2>
<p>Before we go any further, lets create the default values for our customizations. For the tutorial, we&#8217;re going to be adding 2 options: custom background color and a custom CSS area.</p>
<p>Let&#8217;s begin by making a new function, BWPT_theme_options_admin (this is also the function we referenced in the last parameter of add_theme_page and will be the function that displays the HTML of the customization page). First thing inside of this function is gonna be an if-statement to check to see if the page viewer has rights to edit the theme (Administraitor only) and if they can&#8217;t, then kill the page load so they can&#8217;t edit any theme settings.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> BWPT_theme_options_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'edit_themes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span>
        wp_die<span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'You do not have sufficient permissions to access this page.'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Next, we&#8217;re going to create a variable called $BWPT and have it&#8217;s value be the function get_option() with the parameter &#8220;BWPT_theme_options&#8221;. Get_option will grab the corresponding data from the wp_options table in the database that we supply it in the parameter, if it doesn&#8217;t find a match, then it will return false. So we&#8217;ll use this to check to see if the customizations have already been made, and if not, then add the defaults to the database.</p>
<p>Adding options to the database is easy using the function add_option(). You just supply it with a key (a name) and a value. To save time, space, memory, and add convienence, you should always have your options inside of an array and then add the array to the options table, so you have 1 row to get and 1 row to update.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$BWPT</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$BWPT_defaults</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$BWPT_defaults</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'background-color'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#cccccc'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$BWPT_defaults</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'other-css'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
    add_option<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;BWPT_theme_options&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$BWPT_defaults</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Step 3: Adding the HTML</h2>
<p>Now that we have a page and some options, we can put in some HTML to start editing them. Basically our entire page is going to consist of a form (formatted via tables) and each input we&#8217;re going to output the options we set up last step (remember, they&#8217;ll already be at the defaults if they&#8217;re not changed so we don&#8217;t have to bother with any if/else statements). This step is really simple and requires no explination, just be sure to notice how the tables are set up and the classes applied to each element (using classes from the admin CSS will help give your options page more uniformity with the rest of the back-end).</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$BWPT_admin_html</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;</span></pre></div></div>

<div class="wrap">
<h2>Manage Theme Options</h2>
<p>{$updated_html}<br />
<form id="BWPT-form" method="post">
<table class="form-table">
<tbody>
<tr>
<th scope="row" valign="top"><label for="background-color">Background Color: </label></th>
<td>
<input id="background-color" class="regular-text" type="text" name="background-color" value="{$BWPT[&quot;background-color&quot;]}" maxlength="7" /></td>
</tr>
<tr>
<th scope="row" valign="top"><label for="other-css">Other CSS</label></th>
<td><textarea id="other-css" style="width: 90%;" name="other-css" rows="10" cols="45">{$BWPT["other-css"]}</textarea></td>
</tr>
</tbody>
</table>
<p><span class="submit" style="border: 0;"><br />
<input type="submit" name="submit" value="Save Settings" /></span></form>
</div>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">&quot;;
echo <span style="color: #006699; font-weight: bold;">$BWPT_admin_html</span>;</span></pre></div></div>

<p><img class="alignnone size-full wp-image-103" title="2" src="http://beautifulwordpressthemes.com/wp-content/uploads/2010/07/2.jpg" alt="" width="600" height="300" /></p>
<h2>Step 4: Updating the Options</h2>
<p>We have our form setup, so let&#8217;s use it to save the changes to our theme options. You&#8217;ll notice that our form tag has an empty action attribute, that&#8217;s so the page will reload when we press submit and we don&#8217;t have to make another file to handle the update methods. To start, inside of that same admin function we&#8217;re going to add a new if-statement that checks the $_POST globals for the submit button id (&#8216;submit&#8217;), and if it is set, then we&#8217;re going to use the function update_option to update the database info (after we make it safe with the function mysql_real_escape_string()) and we&#8217;re also going to make a new variable, $update_html, and fill it with some html to let the user know that the update went through.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'submit'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'background-color'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'background-color'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'other-css'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'other-css'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    update_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #339933;">,</span><span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$updated_html</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;</span></pre></div></div>

<div id="message" class="updated below-h2">Header updated. <a href="{$url}">Visit your site</a> to see how it looks.</div>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #0000ff;">&quot;;
}</span></pre></div></div>

<p>Step 5: Using these options</p>
<p>Now that we have the options in the database, we can use them in our themes by calling get_option. In our example, we created a custom background color, and specificed some other css to include as well. There are 2 ways we could add these changes to our theme: write it into the header.php file or use the action &#8220;wp_head&#8221;. We&#8217;ll cover both ways.</p>
<p>Let&#8217;s start with the action method, we&#8217;re going to create a new function (outside the admin function) called BWPT_theme_options_client and inside the function use get_option to get the changes from the database and then we&#8217;ll echo out the css inside some style tags. In order for this to work though we need to call the add_action() function with the parameters: &#8216;wp_head&#8217;, &#8216;BWPT_theme_options_client&#8217;. This will add our new CSS where the function wp_head() is called in our theme.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">function</span> BWPT_theme_options_client<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$BWPT</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$BWPT_styles</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;
&lt;!--
                body {background-color: {<span style="color: #006699; font-weight: bold;">$BWPT</span>[&quot;</span>background<span style="color: #339933;">-</span>color<span style="color: #0000ff;">&quot;]};}
                {<span style="color: #006699; font-weight: bold;">$BWPT</span>[&quot;</span>other<span style="color: #339933;">-</span>css<span style="color: #0000ff;">&quot;]}
&nbsp;
--&gt;
&nbsp;
        &quot;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$BWPT_styles</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'BWPT_theme_options_client'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The second method involves removing the function we made and pasting it&#8217;s contents wherever we want the changes to be applied (in our case, header.php).</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$BWPT</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$BWPT_styles</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;
&lt;!--
            body {background-color: {<span style="color: #006699; font-weight: bold;">$BWPT</span>[&quot;</span>background<span style="color: #339933;">-</span>color<span style="color: #0000ff;">&quot;]};}
            {<span style="color: #006699; font-weight: bold;">$BWPT</span>[&quot;</span>other<span style="color: #339933;">-</span>css<span style="color: #0000ff;">&quot;]}
&nbsp;
--&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$BWPT_styles</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>the final changes</h2>
<p><img class="alignnone size-full wp-image-104" title="3" src="http://beautifulwordpressthemes.com/wp-content/uploads/2010/07/3.jpg" alt="" width="600" height="300" /></p>
<p>Finished!</p>
<p>That&#8217;s all there is to theme options folks! Some improvements you can make to what we built today are checks to see if a field was left blank and if it was, change it back to it&#8217;s default value. If you have any questions or concerns about the tutorial, please leave a comment!</p>
<p>Final Code With Comments</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> BWPT_theme_options_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Handles everything inside the WP-Admin</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>current_user_can<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'edit_themes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// If the user isn't an administraitor or one with the ability to make changes to the theme</span>
        wp_die<span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'You do not have sufficient permissions to access this page.'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// stop the rest of the page from loading</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$BWPT</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// get the customizations from the database</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// if the customizations don't exist yet</span>
        <span style="color: #000088;">$BWPT_defaults</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// create an empty array</span>
        <span style="color: #000088;">$BWPT_defaults</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'background-color'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#cccccc'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// set the default background color</span>
        <span style="color: #000088;">$BWPT_defaults</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'other-css'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// set the default custom css</span>
&nbsp;
        add_option<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;BWPT_theme_options&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$BWPT_defaults</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// add our customizations to the database</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'submit'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// If they've clicked the submit button</span>
        <span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'background-color'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'background-color'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// escape and save the new background color</span>
        <span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'other-css'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'other-css'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// escape and save the new custom css</span>
        update_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'BWPT_theme_options'</span><span style="color: #339933;">,</span><span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// update the database</span>
&nbsp;
        <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// get the blog url from the database</span>
        <span style="color: #000088;">$updated_html</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;</span></pre></div></div>

<div id="message" class="updated below-h2">Header updated. <a href="{$url}">Visit your site</a> to see how it looks.</div>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">&quot;; // some HTML to show that the options were updated
    }
&nbsp;
    <span style="color: #006699; font-weight: bold;">$BWPT_admin_html</span> = &quot;</span></pre></div></div>

<div class="wrap">
<h2>Manage Theme Options</h2>
<p>{$updated_html}<br />
<form id="BWPT-form" method="post">
<table class="form-table">
<tbody>
<tr>
<th scope="row" valign="top"><label for="background-color">Background Color: </label></th>
<td>
<input id="background-color" class="regular-text" type="text" name="background-color" value="{$BWPT[&quot;background-color&quot;]}" maxlength="7" /></td>
</tr>
<tr>
<th scope="row" valign="top"><label for="other-css">Other CSS</label></th>
<td><textarea id="other-css" style="width: 90%;" name="other-css" rows="10" cols="45">{$BWPT["other-css"]}</textarea></td>
</tr>
</tbody>
</table>
<p><span class="submit" style="border: 0;"><br />
<input type="submit" name="submit" value="Save Settings" /></span></form>
</div>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #0000ff;">&quot;; // all the admin area HTML
    echo <span style="color: #006699; font-weight: bold;">$BWPT_admin_html</span>; // display the admin area HTML
}
&nbsp;
if(get_option('BWPT_theme_options')){ // if the customizations exist
    function BWPT_theme_options_client(){ // display function for the customizations
        <span style="color: #006699; font-weight: bold;">$BWPT</span> = get_option('BWPT_theme_options'); // get our customizations from the database
&nbsp;
        <span style="color: #006699; font-weight: bold;">$BWPT_styles</span> = &quot;</span>
<span style="color: #339933;">&lt;!--</span>
                body <span style="color: #009900;">&#123;</span>background<span style="color: #339933;">-</span>color<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;background-color&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#123;</span><span style="color: #000088;">$BWPT</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;other-css&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">--&gt;</span>
&nbsp;
        <span style="color: #0000ff;">&quot;; // put our customizations into some style tags
        echo <span style="color: #006699; font-weight: bold;">$BWPT_styles</span>; // display the style tags
    }
    add_action( 'wp_head', 'BWPT_theme_options_client' ); // attach our display function to the wp_head function
}</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://beautifulwordpressthemes.com/custom-theme-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add Google Analytics to WordPress without plugins</title>
		<link>http://beautifulwordpressthemes.com/google-analytics-to-wordpress-without-plugins/</link>
		<comments>http://beautifulwordpressthemes.com/google-analytics-to-wordpress-without-plugins/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 15:19:32 +0000</pubDate>
		<dc:creator>Dieter</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://beautifulwordpressthemes.com/?p=114</guid>
		<description><![CDATA[Adding Google Analytics to your WordPress site without using a plugin is really simple. All you need to do is to open footer.php which you find in your themes folder (wp-content&#8211;&#62;themes&#8211;&#62;Mytheme).  just above &#60;/body&#62; paste your Google Analytics code and upload the file to your server again.]]></description>
			<content:encoded><![CDATA[<p>Adding Google Analytics to your WordPress site without using a plugin is really simple. All you need to do is to open footer.php which you find in your themes folder (wp-content&#8211;&gt;themes&#8211;&gt;Mytheme).  just above &lt;/body&gt; paste your Google Analytics code and upload the file to your server again.</p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulwordpressthemes.com/google-analytics-to-wordpress-without-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Theme: Sortable</title>
		<link>http://beautifulwordpressthemes.com/free-theme-sortable/</link>
		<comments>http://beautifulwordpressthemes.com/free-theme-sortable/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 21:19:23 +0000</pubDate>
		<dc:creator>Dieter</dc:creator>
				<category><![CDATA[Free Wordpress Themes]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://beautifulwordpressthemes.com/?p=166</guid>
		<description><![CDATA[Sortable has moved to http://gnuthemes.org/2011/05/08/sortable-1-1/]]></description>
			<content:encoded><![CDATA[<p>Sortable has moved to <a title="Gnuthemes" href="http://gnuthemes.org/2011/05/08/sortable-1-1/">http://gnuthemes.org/2011/05/08/sortable-1-1/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulwordpressthemes.com/free-theme-sortable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Theme: Polar</title>
		<link>http://beautifulwordpressthemes.com/free-theme-polar/</link>
		<comments>http://beautifulwordpressthemes.com/free-theme-polar/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 22:53:07 +0000</pubDate>
		<dc:creator>Dieter</dc:creator>
				<category><![CDATA[Free Wordpress Themes]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[clean]]></category>
		<category><![CDATA[Free]]></category>

		<guid isPermaLink="false">http://beautifulwordpressthemes.com/?p=146</guid>
		<description><![CDATA[&#160; Polar is a clean and simple business theme with bright and beautiful colors. Great for small business sites, portfolios and blogs Custom Frontpage Nice Jquery Slider Automatic Thumbnails Supports WP3 Menus Multilevel Menu Nested Comments PSD Included View Live Demo DownloadDownloaded 448 times]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>Polar is a clean and simple business theme with bright and beautiful colors. Great for small business sites, portfolios and blogs</p>
<ul>
<li>Custom Frontpage</li>
<li>Nice Jquery Slider</li>
<li>Automatic Thumbnails</li>
<li>Supports WP3 Menus</li>
<li>Multilevel Menu</li>
<li>Nested Comments</li>
<li>PSD Included</li>
</ul>
<p>View <a title="Theme Demo" href="../demo/polar/"><strong>Live Demo</strong></a></p>
<p><a  title='Polar' href='http://beautifulwordpressthemes.com/?wpdmact=process&did=MS5ob3RsaW5r' style="background:url('http://beautifulwordpressthemes.com/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download</a><br><small style='margin-left:30px;'>Downloaded 448 times</small></p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulwordpressthemes.com/free-theme-polar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable multisite in WordPress 3</title>
		<link>http://beautifulwordpressthemes.com/enable-multisite-in-wordpress-3/</link>
		<comments>http://beautifulwordpressthemes.com/enable-multisite-in-wordpress-3/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 14:35:31 +0000</pubDate>
		<dc:creator>Dieter</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://beautifulwordpressthemes.com/?p=69</guid>
		<description><![CDATA[In WordPress 3 you can create several different blogs from one single install. However, this is not an default option in your admin panel but it is very easy to enable it. Here is how to do it in two steps Open wp-config.php and add define(&#8216;WP_ALLOW_MULTISITE&#8217;, true); right above // ** MySQL settings (line 16-17 or so) Upload the file again and go to the &#8220;Tools&#8221; tab in your admin, [...]]]></description>
			<content:encoded><![CDATA[<p>In <strong>WordPress 3</strong> you can create several different blogs from one single install. However, this is not an default option in your admin panel but it is very easy to enable it. Here is how to do it in two steps</p>
<ul>
<li>Open wp-config.php and add <strong>define(&#8216;WP_ALLOW_MULTISITE&#8217;, true); </strong>right above // ** MySQL settings (line 16-17 or so)</li>
<li>Upload the file again and go to the &#8220;Tools&#8221; tab in your admin, click on &#8220;Network&#8221; and follow the instructions</li>
</ul>
<p>That&#8217;s all</p>
]]></content:encoded>
			<wfw:commentRss>http://beautifulwordpressthemes.com/enable-multisite-in-wordpress-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

