<?xml version="1.0" encoding="utf-8"?><!-- generator="b2evolution/6.7.7-stable" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>My PHP blog</title>
		<link>https://www.itblogs.info/index.php?blog=2</link>
		<atom:link rel="self" type="application/rss+xml" href="https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2" />
		<description>this blogs is about PHP.</description>
		<language>en-EU</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=6.7.7-stable"/>
		<ttl>60</ttl>
				<item>
			<title>The Cleanest and easiest way to change the title format for WordPress</title>
			<link>https://www.itblogs.info/index.php/the-cleanest-and-easiest-way?blog=2</link>
			<pubDate>Tue, 16 Mar 2021 11:49:00 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">WordPress</category>			<guid isPermaLink="false">1098@https://www.itblogs.info/</guid>
						<description>&lt;p&gt;I wish to change the format title in header in one of my wordpress websites. I know I can define a custom function to change that. I tried that, that is not working my template. Finally, I found a cleanest and easiest way to do, without writing a single line of code. That is to install Yoast SEO plug-in. This plug-in can allow the user to define page title in header for each page and post. That is very flexible. Moreover, it has a lot of placeholder too, such as site title, page title and post title.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://www.itblogs.info/index.php/the-cleanest-and-easiest-way?blog=2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I wish to change the format title in header in one of my wordpress websites. I know I can define a custom function to change that. I tried that, that is not working my template. Finally, I found a cleanest and easiest way to do, without writing a single line of code. That is to install Yoast SEO plug-in. This plug-in can allow the user to define page title in header for each page and post. That is very flexible. Moreover, it has a lot of placeholder too, such as site title, page title and post title.</p><div class="item_footer"><p><small><a href="https://www.itblogs.info/index.php/the-cleanest-and-easiest-way?blog=2">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://www.itblogs.info/index.php/the-cleanest-and-easiest-way?blog=2#comments</comments>
			<wfw:commentRss>https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2&#38;disp=comments&#38;p=1098</wfw:commentRss>
		</item>
				<item>
			<title>UTF-8  Slug Issue on WordPress</title>
			<link>https://www.itblogs.info/index.php/utf-8-slug-issue-on?blog=2</link>
			<pubDate>Sun, 10 Nov 2019 08:23:00 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">WordPress Tips</category>			<guid isPermaLink="false">1065@https://www.itblogs.info/</guid>
						<description>&lt;p&gt;In the past, my hosting server supports UTF-8 URL, I can use the chinese name as Slug in wordpress. In the past few days, there is a server upgrade, then UTF-8 does not support anymore. In the past, because I am lazy, blogging in my top priority, I left the chinese name in URL. I know that is not good for SEO. Also, it made all post links are not working anymore.&lt;br /&gt;
I found only way is to reset all post slugs with a random number. I know that affects SEO, it made all post links in search engine in not working. &lt;br /&gt;
At the end I ran this sql to reset all old posts,&lt;br /&gt;
update set wp_posts&lt;br /&gt;
set post_name = floor(RAND()*10)+15&lt;br /&gt;
where post_name like &#039;%\%%&#039;&lt;/p&gt;

&lt;p&gt;That is a bad solution, but that is the best solution I had now. Now, I manually write 301 Direct for all popular posts I have aware to the new url.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://www.itblogs.info/index.php/utf-8-slug-issue-on?blog=2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>In the past, my hosting server supports UTF-8 URL, I can use the chinese name as Slug in wordpress. In the past few days, there is a server upgrade, then UTF-8 does not support anymore. In the past, because I am lazy, blogging in my top priority, I left the chinese name in URL. I know that is not good for SEO. Also, it made all post links are not working anymore.<br />
I found only way is to reset all post slugs with a random number. I know that affects SEO, it made all post links in search engine in not working. <br />
At the end I ran this sql to reset all old posts,<br />
update set wp_posts<br />
set post_name = floor(RAND()*10)+15<br />
where post_name like '%\%%'</p>

<p>That is a bad solution, but that is the best solution I had now. Now, I manually write 301 Direct for all popular posts I have aware to the new url.</p><div class="item_footer"><p><small><a href="https://www.itblogs.info/index.php/utf-8-slug-issue-on?blog=2">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://www.itblogs.info/index.php/utf-8-slug-issue-on?blog=2#comments</comments>
			<wfw:commentRss>https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2&#38;disp=comments&#38;p=1065</wfw:commentRss>
		</item>
				<item>
			<title>PHP Square Bracket Errors</title>
			<link>https://www.itblogs.info/index.php/php-square-bracket-errors?blog=2</link>
			<pubDate>Tue, 27 Dec 2016 10:15:00 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">Tips for PHP</category>			<guid isPermaLink="false">1030@https://www.itblogs.info/</guid>
						<description>&lt;p&gt;I built a wordpress plug-in. The plug-in is working fine in a server, but another server returned an error about &#039;[. I compared the two servers. Their php is different. The problematic server got old version of php which is php .5.3. Then I read&lt;a href=&quot;http://php.net/manual/en/language.types.array.php&quot;&gt; the php specification&lt;/a&gt;. The Square Bracket array declaration which used in C# and Java is only available on Php &gt;=5.4. So I have to change square brackets to array(). Then it works fine.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://www.itblogs.info/index.php/php-square-bracket-errors?blog=2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I built a wordpress plug-in. The plug-in is working fine in a server, but another server returned an error about '[. I compared the two servers. Their php is different. The problematic server got old version of php which is php .5.3. Then I read<a href="http://php.net/manual/en/language.types.array.php"> the php specification</a>. The Square Bracket array declaration which used in C# and Java is only available on Php >=5.4. So I have to change square brackets to array(). Then it works fine.</p><div class="item_footer"><p><small><a href="https://www.itblogs.info/index.php/php-square-bracket-errors?blog=2">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://www.itblogs.info/index.php/php-square-bracket-errors?blog=2#comments</comments>
			<wfw:commentRss>https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2&#38;disp=comments&#38;p=1030</wfw:commentRss>
		</item>
				<item>
			<title>The Database Object in WordPress</title>
			<link>https://www.itblogs.info/index.php/the-database-object-in-wordpress?blog=2</link>
			<pubDate>Sun, 18 Dec 2016 23:41:00 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">WordPress Tips</category>			<guid isPermaLink="false">1029@https://www.itblogs.info/</guid>
						<description>&lt;p&gt;You can access the database via WordPress. You can use any raw SQL too.  That is quite easy. You only need to call a global object;&lt;br /&gt;
global $wpdb;&lt;br /&gt;
For the raw SQL, you can use query method:&lt;br /&gt;
$wpdb-&gt;query(&lt;br /&gt;
    &quot;&lt;br /&gt;
    UPDATE $wpdb-&gt;posts &lt;br /&gt;
    SET post_parent = 10&lt;br /&gt;
    WHERE ID = 15 &lt;br /&gt;
      &lt;br /&gt;
    &quot;&lt;br /&gt;
);&lt;/p&gt;

&lt;p&gt;For get the record set,&lt;br /&gt;
$drafts = $wpdb-&gt;get_results( &lt;br /&gt;
	&quot;&lt;br /&gt;
	SELECT * &lt;br /&gt;
	FROM $wpdb-&gt;posts&lt;br /&gt;
	WHERE post_status = &#039;draft&#039; &lt;br /&gt;
		AND post_author =1&lt;br /&gt;
	&quot;&lt;br /&gt;
);&lt;/p&gt;

&lt;p&gt;There are insert, update and delete method too.&lt;br /&gt;
Please read &lt;a href=&quot;https://codex.wordpress.org/Class_Reference/wpdb&quot;&gt;WordPress development documentation&lt;/a&gt; for the further information&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://www.itblogs.info/index.php/the-database-object-in-wordpress?blog=2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>You can access the database via WordPress. You can use any raw SQL too.  That is quite easy. You only need to call a global object;<br />
global $wpdb;<br />
For the raw SQL, you can use query method:<br />
$wpdb->query(<br />
    "<br />
    UPDATE $wpdb->posts <br />
    SET post_parent = 10<br />
    WHERE ID = 15 <br />
      <br />
    "<br />
);</p>

<p>For get the record set,<br />
$drafts = $wpdb->get_results( <br />
	"<br />
	SELECT * <br />
	FROM $wpdb->posts<br />
	WHERE post_status = 'draft' <br />
		AND post_author =1<br />
	"<br />
);</p>

<p>There are insert, update and delete method too.<br />
Please read <a href="https://codex.wordpress.org/Class_Reference/wpdb">WordPress development documentation</a> for the further information</p><div class="item_footer"><p><small><a href="https://www.itblogs.info/index.php/the-database-object-in-wordpress?blog=2">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://www.itblogs.info/index.php/the-database-object-in-wordpress?blog=2#comments</comments>
			<wfw:commentRss>https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2&#38;disp=comments&#38;p=1029</wfw:commentRss>
		</item>
				<item>
			<title>WordPress Serialize the JSON object</title>
			<link>https://www.itblogs.info/index.php/wordpress-serialize-the-json-object?blog=2</link>
			<pubDate>Sun, 18 Dec 2016 00:57:00 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">Announcements [A]</category>			<guid isPermaLink="false">1028@https://www.itblogs.info/</guid>
						<description>&lt;p&gt;Although WordPress got its own JSON API,  you still have your own JSON API for your own plugin and serialize your own data. That is not a problem. WordPress library got a function to serialize any objects to JSON Format. That is very easy. You can use this function in any parts of your plug-in.&lt;br /&gt;
wp_send_json($user);&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://www.itblogs.info/index.php/wordpress-serialize-the-json-object?blog=2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Although WordPress got its own JSON API,  you still have your own JSON API for your own plugin and serialize your own data. That is not a problem. WordPress library got a function to serialize any objects to JSON Format. That is very easy. You can use this function in any parts of your plug-in.<br />
wp_send_json($user);</p><div class="item_footer"><p><small><a href="https://www.itblogs.info/index.php/wordpress-serialize-the-json-object?blog=2">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://www.itblogs.info/index.php/wordpress-serialize-the-json-object?blog=2#comments</comments>
			<wfw:commentRss>https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2&#38;disp=comments&#38;p=1028</wfw:commentRss>
		</item>
				<item>
			<title>WordPress Finally got a REST API</title>
			<link>https://www.itblogs.info/index.php/wordpress-finally-got-a-rest?blog=2</link>
			<pubDate>Sat, 10 Dec 2016 12:09:00 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">General PHP</category>			<guid isPermaLink="false">1027@https://www.itblogs.info/</guid>
						<description>&lt;p&gt;I used Wordpress as the development framework for a mobile application project. Wordpress has a set of XMLPRC api for a very long time. Moreover, the mainstream in Mobile development is to use JSON as the communication format, rather than &lt;a href=&quot;http://www.tellmewhatis.com/xml&quot;&gt;XML&lt;/a&gt;. JSON is smaller and easier to deserialize back to an object. Originally, I planned to use a third party plug-in for REST API and with my own code to build my own version REST API for my mobile application. Today, I checked my WordPress; It got an update for WordPress 4.7. After the updates, I found this version finally got an official REST API. That is great. I can build my code on top of that!&lt;br /&gt;
You can check &lt;a href=&quot;https://demo.wp-api.org/&quot;&gt;this demo&lt;/a&gt; from Wordpress&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://www.itblogs.info/index.php/wordpress-finally-got-a-rest?blog=2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I used Wordpress as the development framework for a mobile application project. Wordpress has a set of XMLPRC api for a very long time. Moreover, the mainstream in Mobile development is to use JSON as the communication format, rather than <a href="http://www.tellmewhatis.com/xml">XML</a>. JSON is smaller and easier to deserialize back to an object. Originally, I planned to use a third party plug-in for REST API and with my own code to build my own version REST API for my mobile application. Today, I checked my WordPress; It got an update for WordPress 4.7. After the updates, I found this version finally got an official REST API. That is great. I can build my code on top of that!<br />
You can check <a href="https://demo.wp-api.org/">this demo</a> from Wordpress</p><div class="item_footer"><p><small><a href="https://www.itblogs.info/index.php/wordpress-finally-got-a-rest?blog=2">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://www.itblogs.info/index.php/wordpress-finally-got-a-rest?blog=2#comments</comments>
			<wfw:commentRss>https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2&#38;disp=comments&#38;p=1027</wfw:commentRss>
		</item>
				<item>
			<title>I upgraded this blog to b2evolution 6.7.7</title>
			<link>https://www.itblogs.info/index.php/i-upgraded-this-blog-to?blog=2</link>
			<pubDate>Tue, 04 Oct 2016 13:49:00 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">Announcements [A]</category>			<guid isPermaLink="false">1014@https://www.itblogs.info/</guid>
						<description>&lt;div&gt;&lt;div&gt;&lt;a href=&quot;https://www.itblogs.info/media/blogs/a/quick-uploads/p1014/itblogs_full.png?mtime=1475588612&quot; rel=&quot;lightbox[p1014]&quot; id=&quot;link_104&quot;&gt;&lt;img alt=&quot;I upgraded this blog to b2evolution 6.7.7&quot; src=&quot;https://www.itblogs.info/media/blogs/a/quick-uploads/p1014/.evocache/itblogs_full.png/fit-320x320.png?mtime=1475588612&quot; width=&quot;320&quot; height=&quot;214&quot; class=&quot;loadimg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;I have upgraded this blog to &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt; 6.7.7. I found that is great, the backend is more beautiful and clean too.  I found the color scheme too.  One thing is good to b2evolution comparing with other blog platforms; that is a very standalone platform which got most functions you need. If you just need it to do blogging, then that is perfect, you do not need to install a single plugin. But the downside, you cannot use it for another purpose. Well, I just need this blog to do blogging. That is good enough. By the way, I installed a responsive skin too. I found that is the best way to get more traffic. Now, Google will downgrade the ranking if any websites are not mobile friendly.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://www.itblogs.info/index.php/i-upgraded-this-blog-to?blog=2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<div><div><a href="https://www.itblogs.info/media/blogs/a/quick-uploads/p1014/itblogs_full.png?mtime=1475588612" rel="lightbox[p1014]" id="link_104"><img alt="I upgraded this blog to b2evolution 6.7.7" src="https://www.itblogs.info/media/blogs/a/quick-uploads/p1014/.evocache/itblogs_full.png/fit-320x320.png?mtime=1475588612" width="320" height="214" class="loadimg" /></a></div></div><p>I have upgraded this blog to <a href="http://b2evolution.net/">b2evolution</a> 6.7.7. I found that is great, the backend is more beautiful and clean too.  I found the color scheme too.  One thing is good to b2evolution comparing with other blog platforms; that is a very standalone platform which got most functions you need. If you just need it to do blogging, then that is perfect, you do not need to install a single plugin. But the downside, you cannot use it for another purpose. Well, I just need this blog to do blogging. That is good enough. By the way, I installed a responsive skin too. I found that is the best way to get more traffic. Now, Google will downgrade the ranking if any websites are not mobile friendly.</p><div class="item_footer"><p><small><a href="https://www.itblogs.info/index.php/i-upgraded-this-blog-to?blog=2">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://www.itblogs.info/index.php/i-upgraded-this-blog-to?blog=2#comments</comments>
			<wfw:commentRss>https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2&#38;disp=comments&#38;p=1014</wfw:commentRss>
		</item>
				<item>
			<title>Shortcode in WooCommerce</title>
			<link>https://www.itblogs.info/index.php/shortcode-in-woocommerce?blog=2</link>
			<pubDate>Sun, 19 Jun 2016 19:40:00 +0000</pubDate>			<dc:creator>admin</dc:creator>
			<category domain="main">General PHP</category>			<guid isPermaLink="false">999@https://www.itblogs.info/</guid>
						<description>&lt;p&gt;If you want to have a new custom shortcode in WooCommerce, you can add the codes in wp-content\plug-ins\woocommerce\includes\class-wc-shortcode.php. That will works, however, that is not the best practice. Because if some one updated the woocomerce plug-ins, then your custom code will be overwritten. I suggest you write your plug-in, Then using:&lt;br /&gt;
&lt;p class=&quot;codeblock_title&quot;&gt;Code&lt;/p&gt;&lt;div class=&quot;codeblock codeblock_with_title amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code class=&quot;codeblock&quot;&gt;&lt;span class=&quot;amc_default&quot;&gt;add_shortcode( &#039;list_products&#039;, &#039;list_products&#039; );&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code class=&quot;codeblock&quot;&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;function list_products( $atts ) {&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code class=&quot;codeblock&quot;&gt;&lt;span class=&quot;amc_default&quot;&gt;....&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code class=&quot;codeblock&quot;&gt;&lt;span class=&quot;amc_default&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
Then you can have your own shortcode,  then you can use global $woocommerce_loop; , that global variable to retrieve the data from woocommerce.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://www.itblogs.info/index.php/shortcode-in-woocommerce?blog=2&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>If you want to have a new custom shortcode in WooCommerce, you can add the codes in wp-content\plug-ins\woocommerce\includes\class-wc-shortcode.php. That will works, however, that is not the best practice. Because if some one updated the woocomerce plug-ins, then your custom code will be overwritten. I suggest you write your plug-in, Then using:<br />
<p class="codeblock_title">Code</p><div class="codeblock codeblock_with_title amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code class="codeblock"><span class="amc_default">add_shortcode( 'list_products', 'list_products' );</span></code></td></tr><tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code class="codeblock"><span class="amc_default">&#160;&#160;&#160;&#160;function list_products( $atts ) {</span></code></td></tr><tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code class="codeblock"><span class="amc_default">....</span></code></td></tr><tr class="amc_code_even"><td class="amc_line"><div class="amc4"></div></td><td><code class="codeblock"><span class="amc_default">}</span></code></td></tr></table></div><br />
Then you can have your own shortcode,  then you can use global $woocommerce_loop; , that global variable to retrieve the data from woocommerce.</p><div class="item_footer"><p><small><a href="https://www.itblogs.info/index.php/shortcode-in-woocommerce?blog=2">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://www.itblogs.info/index.php/shortcode-in-woocommerce?blog=2#comments</comments>
			<wfw:commentRss>https://www.itblogs.info/index.php?blog=2&#38;tempskin=_rss2&#38;disp=comments&#38;p=999</wfw:commentRss>
		</item>
			</channel>
</rss>
