<?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 html - WP2X</title> <atom:link href="https://wp2x.com/tag/wordpress-html/feed/" rel="self" type="application/rss+xml" /><link>https://wp2x.com</link> <description>We can help your Wordpress faster</description> <lastBuildDate>Sat, 26 Dec 2015 14:39:02 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod> hourly </sy:updatePeriod> <sy:updateFrequency> 1 </sy:updateFrequency> <generator>https://wordpress.org/?v=5.6.16</generator> <item><title>.htaccess redirection tips</title><link>https://wp2x.com/htaccess-redirection-tips/</link> <dc:creator><![CDATA[david]]></dc:creator> <pubDate>Sat, 26 Dec 2015 14:39:02 +0000</pubDate> <category><![CDATA[Wordpress Tips]]></category> <category><![CDATA[wordpress html]]></category> <category><![CDATA[wordpress programming]]></category> <category><![CDATA[wordpress tips]]></category> <category><![CDATA[wordpress tutorial]]></category> <guid
isPermaLink="false">http://wp2x.com/?p=425</guid><description><![CDATA[<p>.htaccess is very powerful. Even the slightest syntax error (like a missing space) can result in your content not displaying correctly or at all. Since .htaccess is a hidden system file, please make sure your FTP client is configured to show hidden files. This is usually an option in the program&#8217;s preferences/options. Let&#8217;s do these ...</p><p>The post <a
rel="nofollow" href="https://wp2x.com/htaccess-redirection-tips/">.htaccess redirection tips</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></description> <content:encoded><![CDATA[<p>.htaccess is very powerful. Even the slightest syntax error (like a missing space) can result in your content not displaying correctly or at all.<span
id="more-425"></span></p><p><img
loading="lazy" class="aligncenter size-full wp-image-426" src="http://wp2x.com/wp-content/uploads/2015/12/illu_htaccess.gif?4b2a2c&amp;4b2a2c" alt="illu_htaccess" width="300" height="300" /></p><p>Since .htaccess is a hidden system file, please make sure your FTP client is configured to show hidden files. This is usually an option in the program&#8217;s preferences/options.</p><p>Let&#8217;s do these step to create a redirection by .htaccess file.</p><h2>1. Create an empty text file using a text editor such as notepad, and save it as htaccess.txt.</h2><h2>2. Edit the contents of the file. Check the following examples:</h2><p>301 (Permanent) Redirect: Point an entire site to a different URL on a permanent basis. This is the most common type of redirect and is useful in most situations. In this example, we are redirecting to the &#8220;mt-example.com&#8221; domain:</p><pre class="lang:default decode:true "># This allows you to redirect your entire website to any other domain
Redirect 301 / http://mt-example.com/</pre><p>302 (Temporary) Redirect: Point an entire site to a different temporary URL. This is useful for SEO purposes when you have a temporary landing page and plan to switch back to your main landing page at a later date:</p><pre class="lang:default decode:true "># This allows you to redirect your entire website to any other domain
Redirect 302 / http://mt-example.com/</pre><p>Redirect index.html to a specific subfolder:</p><pre class="lang:default decode:true "># This allows you to redirect index.html to a specific subfolder
Redirect /index.html http://example.com/newdirectory/

Redirect an old file to a new file path:

# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html
Redirect to a specific index page:

# Provide Specific Index Page (Set the default handler)
DirectoryIndex index.html</pre><h2>3. Upload this file and re-name it to .htaccess</h2><p>MORE POWERFUL URL CHANGES WITH MOD_REWRITE</p><p>If you need to make complex changes to the way your URL displays, you should visit Using .htaccess rewrite rules. You can do things like add &#8220;www&#8221; to the beginning of your URL, redirect all requests to a subfolder but keep the rest of the URL, etc.</p><p>The post <a
rel="nofollow" href="https://wp2x.com/htaccess-redirection-tips/">.htaccess redirection tips</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></content:encoded> </item> <item><title>Randomise elements in PHP array with shuffle</title><link>https://wp2x.com/randomise-elements-in-php-array-with-shuffle/</link> <dc:creator><![CDATA[david]]></dc:creator> <pubDate>Fri, 29 May 2015 15:14:41 +0000</pubDate> <category><![CDATA[Blog]]></category> <category><![CDATA[Wordpress Tips]]></category> <category><![CDATA[php]]></category> <category><![CDATA[wordpress development]]></category> <category><![CDATA[wordpress ebook]]></category> <category><![CDATA[wordpress html]]></category> <category><![CDATA[wordpress programming]]></category> <category><![CDATA[wordpress theme]]></category> <category><![CDATA[wordpress tips]]></category> <category><![CDATA[wordpress tutorial]]></category> <guid
isPermaLink="false">http://wp2x.com/?p=370</guid><description><![CDATA[<p>Randomise elements in PHP array with shuffle is quite easy. I have to spend at least an hour to optimise this task until I found shuffle function what already done this task :). The function reference you can check more detail here: http://php.net/manual/en/function.shuffle.php Here is an example for how to randomise elements in PHP array with ...</p><p>The post <a
rel="nofollow" href="https://wp2x.com/randomise-elements-in-php-array-with-shuffle/">Randomise elements in PHP array with shuffle</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></description> <content:encoded><![CDATA[<p>Randomise elements in PHP array with shuffle is quite easy. I have to spend at least an hour to optimise this task until I found shuffle function what already done this task :).<span
id="more-370"></span></p><p>The function reference you can check more detail here: <a
href="http://php.net/manual/en/function.shuffle.php" target="_blank">http://php.net/manual/en/function.shuffle.php</a></p><p><a
href="http://wp2x.com/wp-content/uploads/2015/05/PHP__shuffle_-_Manual.jpg?4b2a2c&amp;4b2a2c"><img
loading="lazy" class="aligncenter size-full wp-image-371" src="http://wp2x.com/wp-content/uploads/2015/05/PHP__shuffle_-_Manual.jpg?4b2a2c&amp;4b2a2c" alt="PHP__shuffle_-_Manual" width="564" height="326" srcset="https://wp2x.com/wp-content/uploads/2015/05/PHP__shuffle_-_Manual.jpg 564w, https://wp2x.com/wp-content/uploads/2015/05/PHP__shuffle_-_Manual-300x173.jpg 300w" sizes="(max-width: 564px) 100vw, 564px" /></a></p><p>Here is an example for how to randomise elements in PHP array with <strong>shuffle</strong></p><p>Let &#8216;s run this code</p><pre class="lang:php decode:true ">&lt;?php
    $natural_born_killers = array("lions", "tigers", "bears", "kittens");
    shuffle($natural_born_killers);
    var_dump($natural_born_killers);
?&gt;</pre><p>Run in many times and try to see the result array, it will show you different result every time you run it.<br
/> One major drawback to using shuffle() is that it mangles your array keys. This is unavoidable sadly, and you need to live with it when you use shuffle(). Note that shuffle uses its parameter by reference &#8211; it returns true, but shuffles up the parameter you pass to it.</p><p>If you want to pick out just one random value from an array, you can use array_rand() &#8211; it takes an array to read from, then returns one random key from inside there. The advantage to array_rand() is that it leaves the original array intact &#8211; you can use the random key returned to grab the related value from the array, but other than that the original array is left untouched.</p><p><strong>Array_rand</strong>() has an optional second parameter that allows you to specify the number of elements you would like returned. These are each chosen randomly from the array, and are not necessarily returned in any particular order.</p><p>Before I show you an example, you need to be aware of the following attributes of <strong>array_rand</strong>():</p><p>It returns the keys in your array. If these aren&#8217;t specified, the default integer indexes are used. To get the value out of the array, just look up the value at the key.</p><p>If you ask for one random element, or do not specify parameter two, you will get a standard variable back.</p><p>If you ask for more than one random element, you will receive an array of variables back.</p><p>If you ask for more random elements than there are in the array you will get an error</p><p><strong>Array_rand</strong>() will not return duplicate elements if you request more than one random element</p><p>If you want to read most or all of the elements from your array in a random order, use a mass-randomiser like shuffle() &#8211; it is faster.</p><p>With that in mind, here&#8217;s an example of array_rand() in action:</p><pre class="lang:php decode:true">&lt;?php
    $natural_born_killers = array("lions", "tigers", "bears", "kittens");
    var_dump(array_rand($natural_born_killers, 2));
?&gt;</pre><p>&nbsp;</p><p>The post <a
rel="nofollow" href="https://wp2x.com/randomise-elements-in-php-array-with-shuffle/">Randomise elements in PHP array with shuffle</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></content:encoded> </item> <item><title>WordPress jQuery Tiles Gallery Free</title><link>https://wp2x.com/wordpress-jquery-tiles-gallery-free/</link> <dc:creator><![CDATA[david]]></dc:creator> <pubDate>Fri, 20 Feb 2015 02:15:10 +0000</pubDate> <category><![CDATA[HTML/JavaScript/CSS]]></category> <category><![CDATA[css]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[plugin]]></category> <category><![CDATA[theme]]></category> <category><![CDATA[wordpress html]]></category> <category><![CDATA[xhtml]]></category> <guid
isPermaLink="false">http://wp2x.com/?p=346</guid><description><![CDATA[<p>jQuery Tiles Gallery is a gorgeus way to immediately present all your pictures, the visitors of your web site can see all the pictures at a glance, like no other gallery or slider can do! And now It &#8216;s free one on codecanyon this month. You can check the demo URL here http://tiles-gallery.com/ &#160; NO ...</p><p>The post <a
rel="nofollow" href="https://wp2x.com/wordpress-jquery-tiles-gallery-free/">WordPress jQuery Tiles Gallery Free</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></description> <content:encoded><![CDATA[<p>jQuery Tiles Gallery is a gorgeus way to immediately present all your pictures, the visitors of your web site can see all the pictures at a glance, like no other gallery or slider can do! And now It &#8216;s free one on codecanyon this month. You can check the demo URL here <a
href="http://tiles-gallery.com/" target="_blank">http://tiles-gallery.com/</a><span
id="more-346"></span></p><p>&nbsp;</p><h2><a
href="http://wp2x.com/wp-content/uploads/2015/02/artwork-tg.jpg?4b2a2c&amp;4b2a2c"><img
loading="lazy" class="aligncenter size-full wp-image-348" src="http://wp2x.com/wp-content/uploads/2015/02/artwork-tg.jpg?4b2a2c&amp;4b2a2c" alt="artwork-tg" width="590" height="300" srcset="https://wp2x.com/wp-content/uploads/2015/02/artwork-tg.jpg 590w, https://wp2x.com/wp-content/uploads/2015/02/artwork-tg-300x153.jpg 300w" sizes="(max-width: 590px) 100vw, 590px" /></a></h2><h2>NO PROGRAMMING SKILLS REQUIRED</h2><p>jQuery Tiles Gallery arranges your images inside a random-generated grid, it’s much more than a simple multiple column layout, it’s a beautiful and fancy way to present your showcases, galleries, photos… and so on. The subject of the photos will always be focused, since you can choose the better alignment for each photo.. If you don’t know where to start just copy/paste the script in the demo file bundled with the script.</p><h2>NO GRAPHIC SKILLS REQUIRED</h2><p>This script preloads and resizes images to fit them inside each “cell”, so you don’t need to make images of same size or proportions! Be just sure the weight of your photos is good for web (that could mean from few Kb up to 100Kb depending on desired quality).</p><h2>CAPTIONS</h2><p>It’s also possible to add captions simply adding them as ALT attribute of each image. The captions can be static or shown on rollover.</p><p><a
href="http://wp2x.com/wp-content/uploads/2015/02/jQuery-Tiles-Gallery.jpg?4b2a2c&amp;4b2a2c"><img
loading="lazy" class="aligncenter size-full wp-image-347" src="http://wp2x.com/wp-content/uploads/2015/02/jQuery-Tiles-Gallery.jpg?4b2a2c&amp;4b2a2c" alt="jQuery Tiles Gallery" width="400" height="375" srcset="https://wp2x.com/wp-content/uploads/2015/02/jQuery-Tiles-Gallery.jpg 400w, https://wp2x.com/wp-content/uploads/2015/02/jQuery-Tiles-Gallery-300x281.jpg 300w" sizes="(max-width: 400px) 100vw, 400px" /></a></p><p>&nbsp;</p><h2>CALLBACK</h2><p>If you know a bit of javascript you can easiliy add any further functionality to the gallery, simply passing your function as callback.</p><h2>CUSTOM ALIGNMENT, BEST FRAMING</h2><p>You can set a default horizontal and vertical alignment for all the pictures, but you can also overwrite the default alignment simply using the “data” attributes on the IMG tag.</p><p>And now it &#8216;s <strong>FREE</strong> here <div
class="freebie-sub-box"><div
class="freebie-sub-inner"><h3>Please enter your email and get it now!</h3><p>Simply enter your email address and the download link will be sent right to your email box.</p><form
class="freebie-sub-form"><div
class="replaceArea"><div
class="replaceArea-error"></div><center> <input
type="text" onblur="if(this.value=='')this.value='Email Address';" onfocus="if(this.value=='Email Address')this.value='';" value="Email Address" name="email" class="name"> <input
type="submit" value="Download" class="freebie-submit"></center> <input
type="hidden" name="id" id="id" value="aHR0cHM6Ly9hcHAuYm94LmNvbS9zL2k5ajB5MGc3amlieDU1YWV1dWtubm5zdGdhbHpsbnc5"></div></form></div></div><p>The post <a
rel="nofollow" href="https://wp2x.com/wordpress-jquery-tiles-gallery-free/">WordPress jQuery Tiles Gallery Free</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></content:encoded> </item> <item><title>Full width 100% for youtube video iframe</title><link>https://wp2x.com/full-width-100-youtube-video-iframe/</link> <comments>https://wp2x.com/full-width-100-youtube-video-iframe/#comments</comments> <dc:creator><![CDATA[david]]></dc:creator> <pubDate>Tue, 28 Oct 2014 06:12:08 +0000</pubDate> <category><![CDATA[HTML/JavaScript/CSS]]></category> <category><![CDATA[Wordpress Tips]]></category> <category><![CDATA[html]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[wordpress css]]></category> <category><![CDATA[wordpress html]]></category> <category><![CDATA[wordpress js]]></category> <category><![CDATA[wordpress tips]]></category> <guid
isPermaLink="false">http://wp2x.com/?p=312</guid><description><![CDATA[<p>Today I will share you the issue what take me entire of day to solve about Full width 100% for youtube video iframe. Hope it will save your time. If you meet this issue, I believe it just take you 5 minutes to finish the task. &#160; There are 2 ways to solve this issue 1. ...</p><p>The post <a
rel="nofollow" href="https://wp2x.com/full-width-100-youtube-video-iframe/">Full width 100% for youtube video iframe</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></description> <content:encoded><![CDATA[<p>Today I will share you the issue what take me entire of day to solve about Full width 100% for youtube video iframe. Hope it will save your time. If you meet this issue, I believe it just take you 5 minutes to finish the task.<span
id="more-312"></span></p><p><a
href="http://wp2x.com/wp-content/uploads/2014/10/video-full-width.png?4b2a2c&amp;4b2a2c"><img
loading="lazy" class="aligncenter size-full wp-image-313" src="http://wp2x.com/wp-content/uploads/2014/10/video-full-width.png?4b2a2c&amp;4b2a2c" alt="video-full-width" width="660" height="284" srcset="https://wp2x.com/wp-content/uploads/2014/10/video-full-width.png 660w, https://wp2x.com/wp-content/uploads/2014/10/video-full-width-300x129.png 300w" sizes="(max-width: 660px) 100vw, 660px" /></a></p><p>&nbsp;</p><p>There are 2 ways to solve this issue</p><p>1. Javascript to make Full width 100% iframe/embed</p><p>Simple add this jQuery code</p><pre class="lang:js decode:true ">// Find all YouTube videos
var $allVideos = $("iframe[src^='http://www.youtube.com']"),

    // The element that is fluid width
    $fluidEl = $("body");

// Figure out and save aspect ratio for each video
$allVideos.each(function() {

  $(this)
    .data('aspectRatio', this.height / this.width)

    // and remove the hard coded width/height
    .removeAttr('height')
    .removeAttr('width');

});

// When the window is resized
$(window).resize(function() {

  var newWidth = $fluidEl.width();

  // Resize all videos according to their own aspect ratio
  $allVideos.each(function() {

    var $el = $(this);
    $el
      .width(newWidth)
      .height(newWidth * $el.data('aspectRatio'));

  });

// Kick off one resize to fix all videos on page load
}).resize();</pre><p>Now, reload the page and see the magic.</p><p>2. CSS to make Full width 100% iframe/embed</p><p>Much more simple, you can apply this css tips and the result will be the same.</p><pre class="lang:css decode:true">.videoWrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	padding-top: 25px;
	height: 0;
}
.videoWrapper object,
.videoWrapper embed,  {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}</pre><p>Remember add class videoWrapper out of your video then the video inside this class will be display 100%.</p><p>Now, enjoy the result and welcome any comment.</p><p>The post <a
rel="nofollow" href="https://wp2x.com/full-width-100-youtube-video-iframe/">Full width 100% for youtube video iframe</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></content:encoded> <wfw:commentRss>https://wp2x.com/full-width-100-youtube-video-iframe/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>