How To Add Dynamic Meta Description to WordPress

This post is all about adding a Dynamic Meta Description to your WordPress Theme. You can try and add meta description code in the header.php file of your WordPress theme. But it would result into a static meta description. Which means the meta description will remain the same for each and every page on your WordPress site.

But if you want to tweak and optimize your site for search engines then you must add dynamic meta description to your WordPress Theme.

This can help you to have different meta descriptions for your home page, static pages, and blog posts. Also this can help you improve the SEO of your site.

First of all, I don’t know if you have any idea of what is a Meta Description. So i will write few more lines about it before we actually get to the Dynamic Meta Description part.

What is Meta Description?

Meta Description of a page is like a very brief and concise information of what the page is all about. It is not a major factor in determining the search engine rank. But it can surely help you to get good search engine rank for your website.

wordpress dynamic meta description for home pageIn the image above, you can see the green text is what Meta Description looks like in Google Search Results. Now lets see how to add a Meta Description to WordPress Theme.

Adding Static Meta Description To WordPress Theme

We’re going to add a simple meta description to header.php of WordPress Theme. To do so, follow the steps given below –

  • 1) Open Administrators Dashboard > Appearance > Editor > header.php
  • 2) Add the following Code just before the closing head tag ( </head> )

  • 3) Replace Blog Description Goes Here with your Blog Description Text.
  • 4) Update file. And you’re done.

But since header.php is loaded on every page of your WordPress site, the meta description will remain the same on every page of your site. Which means it is a Static Meta Description.

Adding Dynamic Meta Description To WordPress Theme

Lets see  how to add a dynamic meta description to the WordPress Theme. The basic concept is that we are going to use if else code to detect which page is being loaded. And with that information we can then determine an appropriate or dynamic meta description for that respective page.

  • 1) Open Administrators Dashboard > Appearance > Editor > header.php
  • 2) Add the following Code just before the closing head tag ( </head> )

  • 3) Replace Blog Description Goes Here with your Blog Description Text.
  • 4) Update file. And you’re done.

This code helps you to show a Static Meta Description for Home Page as well as Front Page of your WordPress site. But it will generate a dynamic meta description for all your WordPress posts.

The first part of the code checks that if page is home page or front page then display Blog Description. While the second part of the code checks whether the page is a single post page, and if so then use an excerpt of the post as Meta Description.

Now the Meta Description is different for home page as well as for every blog post. And thus we have successfully implemented a Dynamic Meta Description in a WordPress theme.

How To Access Startup Folder in Windows

This is a very short and basic post about how to access startup folder in windows – the easy way.

Normally we access startup folder either by:

1) Opening start menu, then clicking all programs and finally selecting startup folder.
2) Searching for startup folder directly using file explorer.
3) Or navigating to the startup folder manually.

But in this post i am going to share two short shell code or commands which will help you to access startup folder in about 5 to 10 seconds.  All you need to do is put these commands inside command prompt, the run dialog box, or directly by opening start menu in Windows 7 or the Metro UI in Windows 8.

Default Directory

Before that, I would like to share the default directory of Startup Folder for ‘All Users’

1) Windows XP

C:Document and SettingsAll UsersStart MenuProgramsStartup

2) Windows 7 and Windows 8

C:ProgramDataMicrosoftWindowsStart MenuProgramsStartUp

Shell Commands

These are the shell commands which i have tested in Windows 8:

To access startup folder of All Users: shell:common startup

To access startup folder of current logged in user: shell:startup

access startup folder using shell common startup

As i said previously, You can enter these commands in Command Prompt, Start Menu (Windows 7), or Metro UI (Windows 8). So i hope this helps. I am not sure if these work in Windows XP. But if you give it a try, then please let me know the results in comments below. Thanks for reading.

How To Create A Fake Virus To Scare Your Friends

In this post I am going to share a really amazing trick which can help you to scare your friends using a fake virus.

It takes about less than a minute to perform this trick. So its all about creating a message box which would display a message along with two buttons. Both these buttons will have the same function, that is – to close the message box.

The message can be anything like ‘Do you know you are stupid? ‘ and the buttons would contain something like ‘Yes’ and ‘No’.

Or you can even try to scare your friends by adding something like ‘A virus has been detected on your computer. Press Yes to format. Press No to format after reboot.’

So i hope you get the idea of what this thread is all about. Now lets see how to do it.

How To Create a Message Box with Two Buttons?

1) First of all open the Notepad.

2) Copy paste the following code inside the notepad file.

lol=msgbox (“A virus has been detected on your computer. Press Yes to
format. Press No to format after reboot.”,20,”Warning”)

3) Save the file as Virus.vbs or Fake Virus.vbs

4) Open this file. And following message would be displayed:

fake virus warning msgbox

If the File opens in Notepad on Double Clicking ..

If the saved file opens in notepad on double clicking then try to open it by the following actions:

  1. Right Click on file
  2. Click Open With
  3. Select Microsoft Windows Based Script Host

That will do the job.

What about the Scaring Part ?

Yeah i almost forgot about the ‘scaring’ part. Well if you wanna scare your friend then try and get 2 minutes time on their computer. Then just create this vbs file and place this file in the StartUp folder.

Where to find the Startup Folder?

In Windows XP, you can find the startup folder in Start Menu > All Programs > Startup.

In Windows 7 or Windows 8, you can find it in the following directory:

C:UsersUSER-NAMEAppDataRoamingMicrosoftWindowsStart MenuProgramsStartup

Or you can even access the startup folder by typing in shell:common startup or shell:startup in the address bar of file explorer or in the run dialog box.

After putting the Fake Virus file in the StartUp folder, the fake virus would start and display the message box as soon as the user is logged in to Windows. That means the fake virus would be auto executed on windows startup or windows logon. So this can really scare the #3@$ out of your friend !

So i hope, you learned something new today. And thanks for reading !

How To See YouTube Earnings in Google AdSense

If you are a YouTube Partner/Creator then you must be aware of the recent changes in the earnings report for YouTube Earnings. They say that they are simplifying earnings report for YouTube Creators. But they’re actually complicating it more.

If you are using Google Adsense for your Website as well as for YouTube Videos then the estimated earnings for both sources used to be displayed in one simple Adsense Interface.

But now with the recent changes, the estimated earnings for YouTube Channel will not be displayed in the Adsense interface. Only views and clicks will be reported in the adsense interface. However Estimated Youtube Earnings will be displayed as Zero till the end of the month. You can only find your YouTube estimated earnings in YouTube Earning Reports.

Youtube Earnings Change

Advantage

If you are just running advertisements on YouTube channel, then you have to just check YouTube website for your Estimated YouTube Earnings report.

Disadvantage

If you are running advertisements on YouTube channel as well as on your website then you will now have to visit two different websites to check Estimated Earnings report. That means to check website earnings you will have to check Adsense interface and to check YouTube earnings you will have to check YouTube Analytics.

Long Story Short

For some reason, YouTube decided to remove the Estimated Earning report  from AdSense interface. The total Estimated Earnings will still add up and will be displayed at the end of the month. And you will still get paid the same way. But if you want to know how you are doing on any given day then you will have to log in to two different websites.

So what to do next? You cant do anything to view the Estimated Earnings in AdSense. But there is one way to see Total Earnings for YouTube Channel on any given day.

So How To See YouTube “Total” Earnings in Google AdSense ?

First of all, Log in to your AdSense account. And hit on ‘View full reports’ as shown below.

View Full Reports to See YouTube Earnings

Once you do that, Click on Hosted Adsense for Content as shown in the image below.

Click Hosted Adsense for Content To See YouTube Earnings

Now, you can see that the second last column in report contains ‘Total Earnings’. This is how you can view the Total YouTube Earnings for your YouTube account at any given day. Also you can select date range or month and see the Total YouTube Earning Report for that particular date range.

I hope this helps. Thanks for reading. And if you like this thread then please subscribe to blog updates for more amazing threads. Thanks.

How To Remove $Recycle.bin Virus from Windows 8

My previous post was about the Recycler folder in Windows XP. The folder $recycle.bin in Windows 8 is similar to  the recycler folder in Windows XP.

Even though you might consider it as virus, it is not actually a virus. It is a system folder created by Windows to hold temporary files which are deleted.

Which means that if you delete any file or folder, it will be placed inside $recycle.bin folder as a backup until you delete it permanently or restore it back.

But there’s slight difference in the recycler folder and $recycle.bin folder.

The recycler folder will be visible if and only if you choose to display ‘hidden files and folders‘. But $recycle.bin folder is not going to be visible even if you choose to display ‘hidden files and folders’.

This is because the $recycle.bin folder has an additional system file attribute along with hidden attribute.

The only way you can view $recycle.bin folder is by following these steps:

  1. Open any folder.
  2. Click view tab on top.
  3. Select Hidden Items
  4. Click on Options
  5. Click on view tab
  6. And deselect ‘Hide protected operating system files (recommended)’
  7. Click Ok.
  8. Click Apply.

hide protected operating system files

If you select, ‘Hide protected operating system files (recommended)’ then all system protected files including $recycle.bin will be hidden even if ‘show hidden files and folders’ option is selected.

And if you have any doubt that your computer might be infected, i would recommend you to try out antimalwarebytes and scan your computer.

How To Remove Autorun Recycler Virus from Windows

Sometimes you might find a folder called recycler in the root directory of all disks available on your computer (Mainly in hard disk drives and USB drives). 

Most people have a misconception that recycler is a Computer Virus, however its not true. The recycler is nothing but a system folder which is used to keep all deleted data.

In simple words, it means if you delete anything on your D drive then the data will be moved inside a hidden folder called recycler which is in the root directory of D drive. If you open this folder, you can find all deleted images, files, videos, etc.

Recycler Virus with System Volume Information

Along with recycler you can find another folder called System Volume Information. It contains the system restoration information.

The recycler and system volume information folders have the attribute ‘hidden’ by default in Windows XP. So you can only see them if you choose to Show Hidden Files and Folders in Windows XP.

But in Windows 8, these folders have a new name as well as new stealth mode. So these folders are not visible even if you choose to ‘Show Hidden files and folders in Windows 8’.

But recycler is a virus, isn’t it ?

Recycler Virus ExampleSometimes autorun viruses hide themselves inside recycler folder. If you find any executable file such as RECYCLER.exe then that particular file is a virus. Also if your computer is infected with a recycler.exe virus, you might find a vbs file or an autorun file with the following content in it:

[AutoRun]
open=RECYCLER.exe
shellexecute=RECYCLER.exe
shellAutocommand=RECYCLE.exe

If you encounter these type of files, then your computer might be infected with a recycler virus. But remember that the recycler folder is not itself a virus. Its a system folder.

Should I Delete Recycler?

As i said, its a system folder. And it is required by the system. So if you try and delete it. It will again appear on a system reboot. You don’t need to delete the recycler folder or the system volume information folder. Remember that recycler folder is a system folder while recycler.exe is the recycler virus which you should delete.

So How Do I Delete RECYCLER.exe ?

First of all, do not execute any instance of recycler virus ( recycler.exe ). This particular file is an executable file with a ‘folder’ icon. So you might double click on it with the intention of opening the folder. But it turns out to be a process. So when you double click, the virus is executed and remains active. It adds itself to your Windows startup programs list. And thus the recycler virus will be executed each time you run the Operating System.

If recycler virus is active, then no matter how many times you delete it, it will re-appear and create a copy of itself everywhere on the disk drive.

  1. So first Kill the process by opening Task Manager.
  2. Open task manager(right click on taskbar, select task manager). Go in processes tab
  3. Find recycler.exe
  4. Right click on it and click end process
  5. Open start menu > run > type msconfig > hit enter > go to startup tab.
  6. If recycler.exe is present in the list, then uncheck it.
  7. Open start menu > all programs > startup folder.
  8. If you find recycler.exe there, then delete it.
  9. Boot your computer in Safe Mode by hitting “F8” until the “Advanced Boot Options” menu appears. Select “Safe Mode” from the prompt.
  10. Now search your computer for recycler.exe
  11. And delete each and every instance of it if you find any.
  12. Restart your computer.
  13. And install a proper Anti-virus or Anti-malware.

There are other methods to remove recycler virus, but it involves messing with the system registry. But i prefer the graphical method rather than registry and command line.

And it works, if it doesn’t then either you didn’t do it right or its not at all a recycler virus ( recycler.exe ). But if you need any help, comment on this thread below and i will try and help asap.

What’s the case with Recycler and Windows 8 ?

That’s a subject for next thread. Check tomorrow or day after tomorrow for a new thread. Thanks for reading.

Update: How To Remove $Recycle.bin Virus from Windows 8

How To See Hidden Password Behind Asterisks

Today almost all browsers come with a feature which allows the user to save website password. So when the user tries to access that particular website, the username and password field is already populated with the previously entered information.

Though this feature is helpful and saves your time, it is not really a secure option. If you have a personal computer then there’s no problem in using this feature. But if your device is used by different users then its really bad idea to save password on the web browser.

Because its really quite simple to extract the password by running a simple JavaScript.

#1) Using Javascript

In this post i will provide a simple JavaScript that you can use to retrieve or expose the hidden password. This can really be useful to recall the password in case you have forgotten it or if you want to know the password of someone else’s account (assuming that you have access to the PC and the user had stored the login details in the browser before).

First access the web page which contains the login credentials. An example image is shown below.

login to gmail omkar bhagat

Now in the address bar, type in the following:

javascript:

Check the image below.

javascript in address bar

After typing javascript and colon, just give a space and copy paste the following code in front of it.

var p=r(); function r(){var g=0;var x=false;var  x=z(document.forms);g=g+1;var w=window.frames;for(var  k=0;k<w.length;k++) {var x = ((x) ||  (z(w[k].document.forms)));g=g+1;}if (!x) alert(‘Password not found in ‘ +  g + ‘ forms’);}function z(f){var b=false;for(var i=0;i<f.length;i++)  {var e=f[i].elements;for(var j=0;j<e.length;j++) {if (h(e[j]))  {b=true}}}return b;}function h(ej){var s=”;if  (ej.type==’password’){s=ej.value;if (s!=”){prompt(‘The Password is ‘,  s)}else{alert(‘Password is blank’)}return true;}}

So it would result into something like this:

paste javascript in address bar

Then after just hit Enter. This would show you the password as follows:

display password behind asterisk

#2) Using Inspect Element

First access the web page which contains the login credentials. An example image is shown below.

login to gmail omkar bhagat

Right Click on the password field and hit Inspect Element.

inspect element to show password

After clicking on inspect element, you will get a window at the bottom of your browser. It would look similar to the image below:

input type password field

Double Click on ‘password‘ text.

edit input type password

Now hit Backspace and hit Enter.

This would expose the password field. That is, all asterisk or dotted mask will be removed. And the original password hidden under the asterisk or dots will be exposed as shown in the image below.

expose the password field

So i hope this helps. If you have any questions or doubts, feel free to comment below. And do subscribe to blog updates for more amazing tricks and posts.