Showing posts with label Tutorials. Show all posts
Showing posts with label Tutorials. Show all posts

Saturday, September 9, 2017

Add Responsive YouTube and Vimeo Videos to Any Website

In This Tutorial you will learn how to Add Responsive YouTube and Vimeo Videos to Any Website.

YouTube, Vimeo and other video hosts make it easy to embed their players in your own website.
However, they don't provide responsive videos by default. So using just a few lines of CSS. we can make this happen.

Step #1. Get the YouTube Embed Code

  • Go to Youtube.
  • Find the video you want to use on your website.
  • Click on Share >> Embed >> Right click and copy the HTML code.
.
.

Step #2. Use the Embed Code

    <iframe width="420" height="315" src="http://www.youtube.com/embed/6xisazZX9bA" frameborder="0" allowfullscreen></iframe>


Step #3. Modify the Embed Code

Add a div tag around the embed code. Use the CSS class video-responsive so that your code now looks like this:
<div class="video-responsive">
    <iframe width="420" height="315" src="http://www.youtube.com/embed/6xisazZX9bA" frameborder="0" allowfullscreen></iframe>
</div>

Step #4. Add the CSS

Now add some CSS properties inside one of your stylesheet files:
.video-responsive{
    overflow:hidden;
    padding-bottom:56.25%;
    position:relative;
    height:0;
}
.video-responsive iframe{
    left:0;
    top:0;
    height:100%;
    width:100%;
    position:absolute;
}
Your videos now will be responsive. Try resizing your browser to see it in action.
This same process works for Vimeo videos and any other service that uses an iframe tag.

Saturday, August 12, 2017

How to Change a Post to a Page in WordPress

How to Change a Post to a Page in WordPress (or vice versa). 

Fortunately, there is a super simple plugin that allows you to change a post to a page (or vice versa).  Post Type Switcher is the most well-known plugin for this purpose. As shown in the image below, it simply adds a drop-down menu to your Publish box that allows you to change the post type.




You can also change the type using Quick Edit on your Posts or Pages list, or using the bulk editor.
What is the Difference Between a Post and a Page in WordPress?


There is one major distinction between posts and pages in WordPress. Posts include a timestamp, which implies a certain level of timeliness to the information being offered. They are listed in reverse chronological order on your homepage and all of your archive pages, unless you do something to change the order. Pages are “static,” lacking a timestamp and, in theory, remaining forever relevant to your visitors.
Another, less important difference is that while posts can be labeled with categories and tags, pages cannot. You can nest them beneath other pages, though.
This infographic by Kristen Symonds explains the differences very well:

Traditionally, if you are using WordPress to create a blog, most of your content is going to be created as posts. You will have many fewer pages: an about page, a contact page, perhaps a privacy policy, and whatever other miscellaneous pages you decide to add.

Pages are Actually Superior to Posts for SEO purpose

Of course, as with most things SEO, there is not necessarily a clear answer about what is actually better. Some argue that posts have some advantages in that WordPress will automatically create a clear linking structure for the post through its categories, tags, and other archives. There can also be some benefits to having a timestamp appear on your post. If you’ve updated it recently, it can make your content look especially fresh — something search engines like Google seem to value.
Some websites and blogs always seem to have the freshest content when they appear in the search engine results. This is often because the content creators go through and slightly tweak the provided information, then update the content creation date.
  • Another reason to moving a post to a page is the URL. Some WordPress posts have a year and a category, when we move a post to be a page ie an article which is less time dependent, I have the freedom to make the URL short and decide where in my site structure it will go. Just make sure you do a redirect.
  • Pages typically are easier to customize.
  • pages are static. A ‘static page’ will always rank higher than a regular ‘post page’! If you do SEO properly.

Sunday, July 23, 2017

How to Enable PDO Extension in Opencart - Solved

[SOLVED] Fatal error: Class 'PDO' not found in /home/avncrowd/public_html/system/library/db/mpdo.php on line 9


On a windows server you can add the following lines in your php.ini
extension=php_pdo.dll
extension=php_pdo_mysql.dll

On a Linux server you can you can add the following lines in your php.ini 
[ compile php with the following option --with-pdo-mysql In your php.ini, add the following lines (optional) ]

extension=pdo.so;
extension=pdo_mysql.so;

OR SIMPLY RENAME THE PHP.INI FILE TO ANY OTHER FILENAME

Sunday, July 16, 2017

How to Protect your system from Ransomware

How to Protect your system from Ransomware



Ransom-WannaCry is a new variant of ransomware that has been detected in business environments. This threat is also known as WCry, WanaCrypt, Wanna Cry, and WanaCrypt0r.

Tips to follow to protect against ransomware:

Think before you click. If you receive an email that contains an attachment, think twice before clicking on it. If you were not expecting it or it looks suspicious, delete it, even if it appears to come from someone you know; You can always ask them to send it again if it is legitimate.

Back up your files. Always make sure your files are backed up. That way, if they become compromised in a ransomware attack, you can wipe your disk drive clean and restore your data from the backup. Remember, backups can also get infected, so you should disconnect your backup drives from your PC when possible to prevent this from happening.

Update your PC and devices. Ensure that your PC's operating system is up-to-date- to latest Windows 10. Software updates and 'patches' contains security improvements that help to secure your PC and make it more difficult for ransomware and viruses to infect it.

Update your security software. New viruses and threats appear all the time, so it is important to keep your security software up-to-date.