
<?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>WordPress tutorial Archives - TECHNIG</title>
	<atom:link href="https://www.technig.com/tag/wordpress-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.technig.com/tag/wordpress-tutorial/</link>
	<description>Gateway for IT Experts and Tech Geeks</description>
	<lastBuildDate>Tue, 03 May 2016 06:00:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://www.technig.com/wp-content/uploads/2020/04/32x32.png</url>
	<title>WordPress tutorial Archives - TECHNIG</title>
	<link>https://www.technig.com/tag/wordpress-tutorial/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">162720667</site>	<item>
		<title>How to Add Google Search To WordPress Without Plugin</title>
		<link>https://www.technig.com/wordpress-google-search-without-plugin/</link>
					<comments>https://www.technig.com/wordpress-google-search-without-plugin/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Tue, 03 May 2016 06:00:34 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress Developer]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress tutorial]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7274</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>Nowadays we see Google search in almost every WordPress site or blogs. There are many advantage to use Google Search. The benefits of using Google search are speed, users already trust Google brand, you will not have to maintain or update it and if you have adsense account, you can advertise your product on Google search [&#8230;]</p>
<p>The post <a href="https://www.technig.com/wordpress-google-search-without-plugin/">How to Add Google Search To WordPress Without Plugin</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>Nowadays we see Google search in almost every <a href="https://www.technig.com/tag/wordpress/" target="_blank" rel="noopener noreferrer">WordPress </a>site or blogs. There are many advantage to use Google Search. The benefits of using Google search are speed, users already trust Google brand, you will not have to maintain or update it and if you have adsense account, you can advertise your product on Google search result page. The default WordPress search is not much useful, that&#8217;s why every WordPress site owner look for an alternative solutions. There are many plugins for WordPress Google search implementation, but we will show you without plugin solution.</p>
<h2>How to add WordPress Google Search</h2>
<p>The first thing we are going to need is to generate Google search box code from Google CSE. CSE stand for <em>Custom Search</em> <em>Engine. </em>You can generate you code by adding your site name to <a href="https://cse.google.com/cse/all" target="_blank" rel="noopener noreferrer">cse.google.com</a>.</p>
<figure id="attachment_7287" aria-describedby="caption-attachment-7287" style="width: 1190px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/05/WordPress-Google-Search.jpg"><img fetchpriority="high" decoding="async" class="size-full wp-image-7287" src="https://www.technig.com/wp-content/uploads/2016/05/WordPress-Google-Search.jpg" alt="WordPress Google Search" width="1190" height="613" /></a><figcaption id="caption-attachment-7287" class="wp-caption-text">WordPress Google Search</figcaption></figure>
<p>You probably already used Google account to register your site, if not, login and add your site. Once you login, click on add button and fill the necessary information.</p>
<p><a href="https://www.technig.com/wp-content/uploads/2016/05/Add-WordPress-Google-search-page.jpg"><img decoding="async" class="size-full wp-image-7289" src="https://www.technig.com/wp-content/uploads/2016/05/Add-WordPress-Google-search-page.jpg" alt="Add WordPress Google search page" width="931" height="301" /></a></p>
<p>Add WordPress Google search page</p>
<p>One added your site, now you click on Get code button to copy the code we need.</p>
<figure id="attachment_7290" aria-describedby="caption-attachment-7290" style="width: 836px" class="wp-caption alignnone"><a href="https://www.technig.com/wp-content/uploads/2016/05/get-to-for-wordpress-google-search.jpg"><img decoding="async" class="size-full wp-image-7290" src="https://www.technig.com/wp-content/uploads/2016/05/get-to-for-wordpress-google-search.jpg" alt="get to for wordpress google search" width="836" height="439" /></a><figcaption id="caption-attachment-7290" class="wp-caption-text">get to for WordPress google search</figcaption></figure>
<p>Depending on your site, it will generate a unique code for you. Here is what we have generated.</p>
<pre class="theme:sublime-text lang:js decode:true ">&lt;script&gt;
  (function() {
    var cx = '000132328623297516430:yfpvgjmz5b4';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
&lt;/script&gt;
&lt;gcse:search&gt;&lt;/gcse:search&gt;</pre>
<p>By unique code, I means the code we generate is completely different from the code you generate. So make sure you are not copying our code.</p>
<p>Now, open your theme folder. It is located in the<span style="background-color: #c9c9c9;"><em> wp-content/theme/yourtheme. </em></span> You see a searchform.php file there, open that file with notepad or any other text editor you have. Now past the code you have copied form Google CSE site. Save the file and close.</p>
<p>Now you can go to widget page of your WordPress site and add the search widget to side bar. Instead of default WordPress site search box, you will see the Google search. If you search anything in that field now, It will open a modal dialog and show the result.</p>
<h2>Conclusion</h2>
<p>If you want to customize and make the search field look different, you can customize it from Google CSE. Make sure you save the customize code and replace the searchform.php file with the new code generated. We have it has been informative for you. If you have any question or problem, feel free to share it bellow. 🙂</p>
<p>The post <a href="https://www.technig.com/wordpress-google-search-without-plugin/">How to Add Google Search To WordPress Without Plugin</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/wordpress-google-search-without-plugin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7274</post-id>	</item>
		<item>
		<title>Adding more Options to WordPress Customizer with Kirki</title>
		<link>https://www.technig.com/wordpress-customizer-kirki-adding-options/</link>
					<comments>https://www.technig.com/wordpress-customizer-kirki-adding-options/#respond</comments>
		
		<dc:creator><![CDATA[Hujatulla Asghari]]></dc:creator>
		<pubDate>Tue, 26 Apr 2016 05:30:02 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[WordPress Customizer]]></category>
		<category><![CDATA[WordPress Developer]]></category>
		<category><![CDATA[WordPress Tips]]></category>
		<category><![CDATA[WordPress tutorial]]></category>
		<guid isPermaLink="false">https://www.technig.com/?p=7111</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"></div>
<p>In previous tutorial, you have learn how to add and configure the WordPress Kirki customizer. In this tutorial we will continue on by learning how to add panel, section sections and control to our WordPress customizer. If you have came to this tutorial directly, I recommend to read the previous tutorial first. &#160; If you [&#8230;]</p>
<p>The post <a href="https://www.technig.com/wordpress-customizer-kirki-adding-options/">Adding more Options to WordPress Customizer with Kirki</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"></div><p>In previous tutorial, you have learn how to add and configure the WordPress Kirki customizer. In this tutorial we will continue on by learning how to add panel, section sections and control to our WordPress customizer. If you have came to this tutorial directly, I recommend to read the <a href="https://www.technig.com/use-kirki-wordpress-theme-customizer/" target="_blank" rel="noopener noreferrer">previous</a> tutorial first.</p>
<p>&nbsp;</p>
<figure id="attachment_7113" aria-describedby="caption-attachment-7113" style="width: 992px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/04/WordPress-Kirki-Customizer.png"><img loading="lazy" decoding="async" class="size-full wp-image-7113" src="https://www.technig.com/wp-content/uploads/2016/04/WordPress-Kirki-Customizer.png" alt="WordPress Kirki Customizer" width="992" height="554" /></a><figcaption id="caption-attachment-7113" class="wp-caption-text">WordPress Kirki Customizer</figcaption></figure>
<p>If you look at the above picture, you will understand the concept of a panel, section, settings and controls better. The first thing you will need to do is to create a panel. After creating the panel, you can add section and hook them inside that panel. Inside sections, you can add control or section or maybe to say it clearly, adding fields options.</p>
<h2>Creating Panel in WordPress Kirki Customizer</h2>
<p>So, let&#8217;s start adding our first line of code and make a panel in WordPress theme Customizer. To do that, all you need is to write an function and inside that function add your panel using<span style="background-color: #c4c4c4;"> add_panel()</span> function.</p>
<p>Example:</p>
<pre class="theme:sublime-text lang:php decode:true ">function technig_options( $wp_customize ) {
	/**
	 * Add panels
	 */
	$wp_customize-&gt;add_panel( 'technig_theme_options', array(
		'priority'    =&gt; 10,
		'title'       =&gt; __( 'Theme Options', 'technig' ),
	) );
}</pre>
<p>Now, inside technig_options() function, we can add our panel and sections. You can add as many panel as you want. But before that, we should hook this function to WordPress<span style="background-color: #c4c4c4;"> customize_register()</span> function.</p>
<p>Here is how you do that.</p>
<pre class="theme:sublime-text lang:php decode:true ">add_action( 'customize_register', 'technig_options' );
</pre>
<p>Until now, if you check the WordPress Customizer, you will see nothing. It&#8217;s because, WordPress will show the panel if there is no section hooked to that. In the same way it will show the section if their is no setting hook in to it. So let&#8217;s add the section and hook it as well.</p>
<p>&nbsp;</p>
<p><em><strong>First, Create the section</strong></em>. Inside <span style="background-color: #c2c2c2;">teching_options()</span> function add the following code for adding a general option section.</p>
<pre class="theme:sublime-text lang:php decode:true">	/**
	 * Add sections
	 */
       $wp_customize-&gt;add_section( 'general_options', array(
 		'title'       =&gt; __( 'General Options', 'technig' ),
 		'priority'    =&gt; 10,
 		'panel'       =&gt; 'technig_theme_options',
 	) );
</pre>
<p><em><strong>Secondly</strong></em>, create a function for fields and hook it into general options section. For this example, will use image uploader to upload a favicon and than use it in our site.</p>
<pre class="theme:sublime-text lang:php decode:true">function technig_fields( $wp_customize ) {

   /*General Options*/
    $fields[] = array(
	'type'        =&gt; 'image',
	'settings'    =&gt; 'fav_icon',
	'label'       =&gt; __( 'Favicon', 'technig' ),
	'description' =&gt; __( 'Upload your site favicon here', 'technig' ),
	'section'     =&gt; 'general_options',
	'default'     =&gt; '',
	'priority'    =&gt; 10,
);

    return $fields;
}

add_filter( 'kirki/fields', 'technig_fields' );</pre>
<p>Now, check the WordPress Customizer, you have successfully add the first panel, section and fields with WordPress Kirki customizer. It will look like this.</p>
<figure id="attachment_7119" aria-describedby="caption-attachment-7119" style="width: 794px" class="wp-caption aligncenter"><a href="https://www.technig.com/wp-content/uploads/2016/04/WordPress-Kirki-Customizer.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-7119" src="https://www.technig.com/wp-content/uploads/2016/04/WordPress-Kirki-Customizer.jpg" alt="WordPress Kirki Customizer" width="794" height="451" /></a><figcaption id="caption-attachment-7119" class="wp-caption-text">WordPress Kirki Customizer</figcaption></figure>
<h2>How to Use the Value?</h2>
<p>Now, you can use get_theme_mod() function to display the value of the field anywhere in your theme. For our demo, which is favicon, we will use it as favicon in the header of our site.</p>
<p>Example :</p>
<pre class="theme:sublime-text lang:xhtml decode:true">&lt;link rel="shortcut icon" href="&lt;?php echo get_theme_mod('fav_icon'); ?&gt;" /&gt;
</pre>
<p>&nbsp;</p>
<h2>Conclusion.</h2>
<p>This was the part two of the WordPress Kirki Customizer. We have successfully created our theme option panel with section, settings and fields inside. In the next part will discuss about more fields like radio, radio-image, checkbox, textrea and more. We will also discuss about conditional statements and default values in Kirki. I hope it has been informative for you. If you have any types of questions related to this topic, feel free to comment it below. 🙂</p>
<p>The post <a href="https://www.technig.com/wordpress-customizer-kirki-adding-options/">Adding more Options to WordPress Customizer with Kirki</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/wordpress-customizer-kirki-adding-options/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7111</post-id>	</item>
	</channel>
</rss>
