7 Reasons your website’s SEO is not working

Your website’s SEO is not working, but why ? Why all the efforts you made to improve SERP of your website seems to backfire? Why your website failed to achieve the desired ranking despite all the time and money you invested in for the purpose. Every time you look into analytics, you find no or disappointingly small results.

 

Here are 7 reasons your website’s SEO is not working

I totally get your frustration. You have got a great website with original content you are proud of but still your search engine ranking are stuck. Let me help you out why your google rankings are not improving.

1.     Your Website’s Content Quality

Your website’s content decides the fate of your website. Spammy and duplicate or too low content diminishes the chances of improvement for website’s search rankings.  If your website’s content is not informative, precise, perspective, analytical to the visitor, it does not count as quality content.  Your content wont work if it lacks at the characteristics given above. Some other examples of bad quality content are copied, spun, stuffed or thin content.

Let me break down what does I mean by “crappy content types” I stated above.

Copied/Stolen/Duplicate Content

If you have picked up your content from any other web source and pasted it as it is on your website, it is considered as copied or duplicate content. This type is not punitive but it really affects the SERP.

Thin Content

Google launched panda update to deal with website with no or very low content. So, don’t even think about internal link keyword stuffing and blank pages. Google wont like anything that hurts UX.

Spun Content

There are a lot of websites and software that spin a page’s content replacing words and phrases with synonyms. Don’t do this. Google’s crawling bot can easily track this practice.

 

Content with Keyword Stuffing

Google don’t like the idea you writing a keyword multiple times all along the article of page content for the sake of keyword optimization. Google would flag your page as spam and penalize it.

Auto-Generated / Automated Content

Don’t use IFTTT or another tool that posts any other website’s content on your website through a rss or atom feed.

How Do I Fix it?

“Original” and “relevant” content is the keyword you are looking for. There are no shortcuts in this age of competition and AI. Bad content is only going to hurt the reputation and ranking of your website.

 

2. You didn’t Choose Keywords wisely

You optimize your page or article for one or two specific keywords but choosing wrong or irrelevant keywords jeopardize your efforts and could blow any chance for getting desired search engine ranking. Know your audience before putting your content before them. You can pitch something to your visitors without researching the proper keyword and approach.

Let me paint a scenario for you here. “Web Development” and “Website Developer” are two different keywords with different scopes.  If you know your niche, you own all the traffic.

 

How Do I Fix it?

There are a lot of keyword research tools out there. Our most recommended tool is Google Adwords Keyword planner. Ahref comes at close second. These tools would help you plan your keywords and check the competition. I would recommend you to check with multiple tools for the accuracy and broader picture.

 

3. Bad coding practices and broken links

As the competition is getting fierce, it has become almost next to impossible to rank your website better with just broken linkstweaking the content and keywords and brush aside the web development practices. There are meta tags, title tags, facebook open graph meta, twitter cards that your website might be missing right now, making your website’s ranking to take a dip in the traffic.

Meta title tells the search bot crawling your website what your webpage is about. Google delivers content on the search engine indexing based on these tags. Then there are Facebook graph meta tags and twitter card tags which have become essential these days. Your website cannot afford to leave these tags in this age of social media.

Broken links are major problem in the path of getting your website ranked higher. Try sticking to the url structure you created while posting the article or creating the page. Google really doesn’t like broken links and penalize your website if its riddled with broken links.

How Do I Fix it?

You need to fix and Optimize meta titles, descriptions and social media tags. You can use services like “seomofo” or plugin like “YOAST SEO” (for wordpress website) to optimize your webpage for specific keywords. Audit and fix broken links using services like “dead link checker”.

 

4. No Alt tags for Images

Images with proper alt tags and file names play a huge role in your website’s SEO. The person searching for a specific keyword can find the optimized image through the images tab or simple on the google web page listing. These images appearing in the search bar also link back to your website so it’s another plus.

This is the easiest task a search engine optimizing guy can do to rank the page higher and I have seen many of the paying no or little attention to it. Just add the proper alt tag and name the image with web safe name containing the keyword and get ready to be ranked higher for the keyword you optimized your image for.

 

5. Website loads slow

How many times you closed the tab and switched to a closer competitor because the website you were visiting took ages to load? Nobody likes lag. Not only a slow website hurts the user experience, this problem can affect your website’s SEO and reputation. Domain Authority would have to take a blow after higher bounce rate because users are bouncing off the website. Google takes even milliseconds to the count when it comes to ranking and domain authority on the google.

How Do I Fix it?

Thankfully, Google has introduced a tool to help you audit your website for slow performance and deal with this problem. Following are few steps one should take to reduce load time.

  • Enable GZIP Compression
  • Minimize HTTP Requests
  • Reduce server response time
  • Enable browser caching
  • Minify HTML, CSS and JS
  • Optimize and resize images
  • Use CDN to speedup frequently fetched content

 

6. Lack of backlinks

What is a backlink? Backlinks are your website’s links on other websites. Google takes the amount and quality of website’s backlinks into account and evaluate website rankings accordingly. A backlink from a website in your niche and with good domain authority is better than hundreds of backlinks from irrelevant or low-quality websites. Good backlinks can boost your website’s ranking making your website rank higher among the competitors.

How Do I Fix it?

Provide authors and owners of good websites in your niche your quality content and request them to backlink to it. You can use OSE to find out your backlink statistics.

 

7. No or Little Social Media Activity

social mediaPeople and brands use social media to generate crazy amount of traffic for the website which translates into user trust and higher SEO rankings. Social media is being used to engage the targeted audience and keep getting the visits your website deserves.

Effective Social Media engagement pretty much is like quality backlinks.

 

How Do I Fix it?

Use tools like BuzzSumo to get your social media stats. Create social media accounts affiliated with your website and maintain them regularly to keep your website users engaged.

 

Conclusion

There are short guides to SEO but it is not one day or one-time process. It’s a comprehensive ongoing process. You’ll need to take all of the above actions and checklists into consideration and create a strong strategy to bring in the traffic.

You can reach Waqas Yousaf through twitter @wiqi.

Read More
Waqas Yousaf February 19, 2018 2 Comments

10 SEO strategies to increase traffic in 2018

Every blogger has a dream to increase it website’s traffic. Here are 10 SEO strategies to increase traffic of your website. I think you would like to see your analytics topping the charts.

Imagine driving 10 times traffic you are currently pulling to your website. It makes significant difference if you are having more unique visitors to your website. It becomes easier for the sales of the product you are marking. Ultimate key to success in SEO business is grabbing high volumes of traffic from multiple sources.

To help you attain the purpose, I am writing this blog to help you get the 10x traffic with the top 10 SEO strategies to boost your website’s visitor count which are being used in the industry today.

 

Create Multiple Landing Pages Optimized for the Different Keywords

landing page

separate landing page for every keyword.

Here’s the deal. You can’t optimize single web page against multiple keywords. If you are trying to optimize single page for multiple keywords, I think you should probably drop the idea.

Try creating a separate landing page for one focused keyword. If you think its too much of a work then try writing blog around the keyword.

You may try same page style and template for different landing pages, but content needs to be different. Try writing content tailored accordingly to your keyword.

 

Infographics means great amount of traffic

Infographic done right can drive a huge amount of constant traffic toward your website for quite many years. Stack up more infographics and your rankings and traffic would improve as well.

Its age of viral media. Create an infographic regarding a timely topic, discussion. Try roping in authority websites to get it published or linked, it would boost your traffic multi folds. During the process, referral traffic sources have been crated that would automatically bring traffic to your website. Publish infographics regularly. Convince major websites to select it and see your traffic growing eccentrically.

 

Use Google Search Console to Find Keyword Opportunities

Have you every tried looking google search console data from sources? People really miss out the tools google provides you for your advantage.  Instead of third party auditors, you can be 100% sure that you are looking relevant and authentic data. Google Search Analytics is the best section from this. It shows you every keyword and all search entries that ended up on your website as organic search results.

This information can come handy to craft new ways for the keywords your website is already attracting traffic for.  If there are search terms that are gaining a lot of exposure, but not so good Click Through Rates (CTR), You might really need to change meta description and title of the page so this exposure can be solidified.

 

RankBrain is the Future

Future is all about AI and google is global leader. Here’s the definition of RankBrain according to forbes if you are interested.

Google Rank Brain

Google Rank Brain is the future.

“RankBrain is an artificial intelligence system that’s being applied to and used with Google’s current search engine algorithms to provide better results to user queries.”

Believe it or not, RankBrain has the ability to tell spam and bad content from good content just a human being. Try writing the stuff in a way like you are conversing with your audience.  Google is planning to penalize website’s ranking for not following the guideline I have just described above.
Brain Rank has the ability to evolve its skills and it would definitely going to get more intelligent and better over the period of time. Webmasters who would take the lead would be reward with good SERP positions.

 

Word count for blog post matters

I would really suggest the readers to keep an eye on the word count. For a good blog post, minimum word count is around 1600 to 1800 words. Most of the organic positions are occupied by the content with at least 1800-word count. It would be better to cross the average limit for improving your chances of getting ranked higher.

Forget the past where blog posts with count around 500 words shoot up to the top places. Google’s AI BrainRank is evolving and so does SEO. If you satisfy BrainRank and google, then you are definitely going to satisfy the visitors as well. You can create a decent conversation style blog about any topic and cover all the aspects and buzzwords for your visitors as well.

 

Internal Linking is Key to Success

You should get into habit of passing all of your URLs through MOZ’s Open Site Explorer (OSE) for not only creating high quality internal link profile but also, you get to know the pages with the highest Page Authority. Try finding the page who are sitting on the second page of search results. Link these pages to the ones with highest Page Authority one at a time. You’ll observe the spike in the traffic.

 

Multiple Keywords for Optimized Page Titles

I have suggested above that page should be optimized with just one keyword but here’s the thing; page title should be optimized for multiple keywords because page title is one of most important piece in page ranking and it helps to contribute with great volumes of traffic if done right. Organic traffic along with additional keywords can be pulled without compromising the main keyword.

Let me explain it with a real-life scenario here. Say you are optimizing a blog post for the keyword “Samsung Galaxy S8 Review”. Instead of just putting the “Samsung Galaxy S8 Review” on title, you can be created and say “Samsung Galaxy S8 Review and unboxing”. It would help the people who are finding the video of unboxing of the phone to your blog post in great numbers looking for images, videos and opinion about Samsung Galaxy S8.
You have optimized you post for the main keyword but by adding the “unboxing” label gives you a reason to add a youtube video or other multimedia content to your post which would serve your visitors better and attract the more traffic than just one keyword.

 

Outbound Link to High DA Sources

Just like a wise guy said you morph into a kind of five people you surround yourself with. In SEO world, this theory stands out to be truth. Don’t forget to identify at least 5 high authority website in your niche with consistent content being published that can be sourced and linked as a reference.
Do not link back a competitor. Choose news sites and information sites that churn out the news for your desired topics. Let’s have a look at a real-life scenario here. If you are a business advisor and write blog posts about the personal finance and ups and downs of business then following is the top 5 list.

  • Forbes
  • Inc.
  • Entrepreneur
  • Huffington Post
  • Fast Company

If you strategically throw one or two links from these websites into your blog post, it would help search engines understand the class of your website. Since BrainRank is evolving and it will be most likely judging your content, spamy or rubbish blog posts would be brushed aside and penalized while a very well-crafted content with relevant links would help your blog to win the trust of Google.

 

Publish Experts Opinions Style Posts.

How about coming up with a keyword that can work as a keyword as the title of your post, doing little research work, contact experts in your niche and persuade them to participate. Invite a dozen experts to provide their opinion on the said topic or question. Don’t forget to provide links to the experts’ profiles and social media account as it would motivate them to participate.

If you pull this process perfectly, not only there would be extra links but most importantly, very targeted traffic from several streams. You wont even have the trouble of sharing the post and spreading it across the platforms. Look for the mid-level experts that would be excited to be part of your feature and are usually happy to share it on their social media profiles.

 

Final Thoughts

You can grab traffic for your website all the time, if you do it right because your website is the most robust marketing tool your business has. It works day and night and it never asks for vacations or a day off. A basic SEO doesn’t do a miracle in the age of BrainRank. The tools that were working few years ago won’t be working anymore because SEO has evolved over the time.

Competition is getting arduous and there are plenty of people over social media and websites that are popping up for every niche out there so you are required to expand your SEO skills and focus on mastering the expert level tools. These strategies can save you a lot of money time and effort to increase your website’s traffic.

 

You can reach Waqas Yousaf through twitter @wiqi.

Read More
Waqas Yousaf January 14, 2018 0 Comments

How to Access Functions.php | Video

What is Functions.php

WordPress offers extensive customization to your wordpress website. You can edit functionality, looks any way you want to by inserting your own code in the “functions.php” of your wordpress website.

Functions.php comes with the theme and as it is suggested by name, it stores theme’s functions. You can customize your website by manipulating functions.php’s code.. There are two ways you can access the functions.php. It can be either access by a FTP client or it can be accessed in wordpress’s administrator dashboard through browser.

Access functions.php By Using a FTP Client

  1. Open FTP client, Connect to your website by providing FTP Login credentials.
  2. Locate Functions.php by going to the directory below:
    [WordPress Website’s Root]> wp-content > Themes > [current_theme_name] > functions.php.
  3. Download the functions file and update the file with required code.
  4. Upload the file to replace the theme’s function.php with changes made to the file.

Access functions.php Through WordPress Dashboard

  1. Sign-in to your WordPress administrator account.
  2. From sidebar, Select “Appearance > Editor”
  3. Select the theme from “Select theme to edit” drop-down menu.
  4. Under “Theme Files”, “Templates” section, Find and click “Themes Functions (functions.php)”.
  5. Click “Update File” After Making the required updates to the file and to save the changes made to the functions file.

Video Tutorial

You can reach Waqas Yousaf through twitter @wiqi.

Read More
Waqas Yousaf January 10, 2018 0 Comments

Search Engine Optimization Short Guide

In this blog, I’d guide you through the search engine optimization. Its going to be an on point and short tutorial while including all the essentials tricks in the book. Let’s start.

What is Search Engine Optimization?

Search engine optimization (SEO) is the process of optimizing your website to increase the quality and quantity of traffic to your website through organic search engine results.

 

Tools and Skills required

  • Internet Connection
  • A computer system
  • Basic Understanding of HTML tags
  • Common Sense

First, Lets talk about on page SEO.

On page SEO

onpage search engine optimization

Onpage Optimization is the most important step

One page SEO is the most important part of search engine optimization of a website. SEO process if lot faster if on page SEO is done right. Its process of making changes to the page itself you are trying to optimize.

 

Title Tag

Let’s begin with the title Tag. As a webmaster, I recognize that it’s one of the most important elements in onpage search engine optimization step.

Title tag is one of the meta tags which display up in the engines like google search result pages. The Search result heading you see is the title tag of the website.

its important practice to place your planned keyword for the webpage in the Title tag. It helps big time if you place it in the begging of the title. It helps based on viability which all superior users understand as “keyword – prominence”. You should make sure that it is minimum of four-7 words and now not exceeding over 70 letters.

 

H1 Heading

Its vital to place a h1 heading at the start of your post or page. Place the planned keyword in it and make it bold or underline if you want to. You should also have h2 and h3 in your content as well.

The H1 title should be placed at the start of your post/page. Make it bold even under line it if you want, you should use H2 H3 titles within the content as well, making sure to use the keyword too.

There should be one only h1 tag on each page or post.

 

Body Content

Try placing the planned keywords in first three sentences.  Try limiting keyword density to 2.50% and no more than 3.00%. Minimum Content count should be 500 words.

Don’t cram too much text in the content. Your text shouldn’t sound common and spam like. Google wont index it higher and no reader would bother hitting it making the page stats worse. Google penalize spam content which fails to meet the criteria so try avoiding it.

images you are using on the page should be named with your keyword. For Example: wishwebdevelopment.png

Also, do underline, bold, or italicize your main keyword in the post or page at least once.

Image Titles

Try using the main keyword as image’s alternative text. Try placing other important keywords in the alt text as well.

 

Title and Description Meta Tags

Google doesn’t crawl for meta tags anymore. Google’s bot only crawls site content but its better to add meta tags to your website. Just like the h1 or title tag try using main keyword in the beginning and so on. Try Containing the description tag to 150 characters or less of course, keep it informative and specifically related to the topic.

 

Social Meta Tags

Use Twitter Cards, Facebook Open Graph, Google+ Web Snippet and Pinterest Rich pins between the head tags of your website. There meta tags are specifically included for specific website and usually contains thumbnail image, title and summary.

 

Sitemap Generation and Submission

There are lot of plugins for wordpress or Joomla or other content management systems to generate your website’s xml sitemap. Worry not if you have custom or static website. There are many free sitemap generators out there if you want to generate your website’s sitemap.

You can submit this sitemap to google, bing, and Yandex by following the links.

 

Disclosure Page

Generate a Disclosure page here and include its link to footer.

 

Privacy Policy

Generate your website’s privacy policy here and place its link in footer as well.

 

Internal Linking

Make an extra page with main keyword in the title i.e. YOUR KEYWORD Extras and place coming soon etcetera as content and place the all new pages and posts to the extras page. It would work as internal link building.

 

Offsite and Offpage SEO

WordPress Blog

link building on social media

Link building is process of generating vital backlinks

Make a free wordpress blog with main keyword included in the url. i.e. mykeyword.wordpress.com Spin your posts and create wordpress blog posts while citing your website’s posts as main reference. It would work as offsite external link building.

 

Blogger

Create a blogger account and do the same as described above.

 

Reddit and Other Content Aggregators

Create accounts on reddit, dig and other social content aggregators and try posting your stuff on these website.

 

About.Me

Create your page on About.me.

 

Social Media

This is the most important link building step. Try creating your brand or keyword’s facebook page, twitter account and tumblr account. Try posting your links on these social media plateforms while carefully crafting the titles wile posting.

This is it. I wish you best of luck and please share this tutorial if you like it.

 

You can reach Waqas Yousaf through twitter @wiqi.

Read More
Waqas Yousaf January 6, 2018 1 Comment

Google reCAPTCHA 2.0 with Codeigniter Tutorial

Google reCAPTCHA implantation in codeigniter is pretty much easy and here’s the guide to get google reCAPTCHA in codeigniter.

Get Google reCAPTCHA Keys

First you have to generate your recaptcha keys by going to recaptcha admin panel and going to the bottom of the page and generate keys for reCAPTCHA 2.0.

Recaptcha2 keys Generation

 

Dowload Codeigniter Recaptcha Library

Download reCAPTCHA Library for Codeigniter from Here and extract the files. Now, Copy the file from libraries folder to your codeigniter application’s libraries directory and config content to config directory.

3. copy generated keys to config directory’s recaptcha.php

config / recaptcha.php

Create Form View

Now for the coding part we have to create out view (form.php).

[php]

<form action="cap_controller/g_recaptcha" method="post" >
<?php echo $widget;?>
<?php echo $script;?>
<?php echo form_error(‘g-recaptcha-response’); ?>

<input type="submit" value="Submit Form">
</form>

[/php]

 

Create Success View

Here’ our success view (success.php)

[html] <html lang="en">
<head>
<meta charset="UTF-8">
<title>Success</title>
</head>
<body>

<h1>Success!</h1>

</body>
</html>
[/html]

 

Controller Method and Form Validation Callback

Lets create a controller function and validation callback function for it

[php]

<?php // Support Mehtod Starts here

public function g_recaptcha() {
$this->load->library(‘recaptcha’);
$this->load->library(‘form_validation’);
$this->form_validation->set_rules(‘g-recaptcha-response’, ‘Captcha’, ‘callback_captcha_valid|required’);
$this->form_validation->set_error_delimiters(”, ”);

if ($this->form_validation->run() == FALSE) {
$data = array(‘widget’ => $this->recaptcha->getWidget(),
‘script’ => $this->recaptcha->getScriptTag());
$this->load->view("form");
}
else {
$this->load->view("success");
}
}
// Support Mehtod Ends here

// Formvalidation callback Mehtod Starts here
public function captcha_valid($str)
{
$recaptcha = $this->input->post(‘g-recaptcha-response’);

if (!empty($recaptcha)) {
$response = $this->recaptcha->verifyResponse($recaptcha);
if (!isset($response[‘success’]) and $response[‘success’] !== true) {
$this->form_validation->set_message(‘captcha_valid’, ‘Please Verify You Are Not A Robot.’);
return FALSE;
}
else{
return TRUE;
}
}
}
// Formvalidation callback Mehtod Ends here
[/php]

 

Output

and thats it! Here’s the output form is going to look like
Google reCAPTCHA Output in Codeigniter

Read tutorial if you want to display captcha using Codeigniter’s builtin library.

You can reach Waqas Yousaf through twitter @wiqi.

Read More
Waqas Yousaf January 5, 2018 0 Comments

Codeigniter Tricks and Hacks for Beginners

I have been using codeigniter for building small and medium level projects for quite some years now. There are few tweaks and tricks I would love to share with codeigniter enthusiasts to make their work bit easier.

 

HTML Email Templates

If you are building an newsletter system of email delivery method  for sending out different emails with html contents, this one is for you to get the job done seamlessly.

Create a folder in your views directory for email templates e.g. emailtemplates

Create email templates views and save them in the folder. Now we can approach the

[php]

public function send_mail() {

$template = ‘discounts’;

$this->load->library( ’email’ );

$this->email->from( ‘[email protected]’, ‘Some Receiver’ );

$this->email->to( ‘[email protected]’ );

$this->email->subject( ‘Message subject’ );

$this->email->message( $this->load->view( ‘emailtemplates/’ . $template , $data, true ) );

$this->email->send();

}

[/php]

$template is the view file in the emailtemplates folder which would be used to send emails and $data would be an array which would pass the parameters to the view.

 

The Second (Optional) parameter for the $this->uri->segment()

I use $this->uri->segment quite often to get the data from an url . If you haven’t tried it yet, let me explain it first.

If you have an url like http://helloworld.com/example/trick/ , Using

[php]

$this->uri->segment(1);

[/php]

would return you “example” and $this->uri->segment(2); would return you trick and so on.

By passing second parameter to segment method, you can set the default value for the parameter if no value is returned. You can use $this->uri->segment(2, ‘tweak’); and it would return ‘tweak’ even if there is no second segment of uri.

 

Remove Index.php from URL

Go to application > config > config.php

Change

[php] $config[‘index_page’] = "index.php"
[/php]

To

[php] $config[‘index_page’] = ""
[/php]

Open notepad

Paste the following code

[html] RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] [/html]

Save the file as .htaccess in the root directory

You can replace last line of code if the above .htaccess file doesn’t work.

[php] RewriteRule ^(.*)$ index.php?/$1 [L,QSA] [/php]

 

 

Create  Custom Helper

First of all, a CI helper is not a class. It is a PHP file with multiple functions.

Open notepad and create a custom function “hello_world”.

[php] <?php
if ( ! function_exists(‘hello_world’))
{
function hello_world($var = ”)
{
$var = “Hello World! ”. $var;
return $var;
}
}
[/php]

Save this file to application/helpers/ directory. We shall call it “test_helper.php”

Using the Helper

This is how you’ll use it in your controller.

[php] $this->load->helper(test_helper’);
echo hello_world(‘John’);
[/php]

it would display

 Hello World! John

Read More
Waqas Yousaf December 6, 2017 0 Comments

Using Codeigniter’s Built-in Captcha with Form Validation

Why Use Codeigniter’s Built-in Captcha

Captchas are the images you use on your forms to keep bots off the bay. Codeigniter gives you a built-in captcha helper which you can use to generate some captchas. Bit confusing part for newbies is using codeigniter’s form validation with built-in captcha. Following is the working example of captcha generation and captcha validation in codeigniter.

Controller

Test.php

[php] <?php class Test extends CI_Controller { public function my_form(){ if($this->input->post()){
$this->load->library("form_validation");
$this->form_validation->set_rules(‘captcha’, ‘Captcha’, ‘callback_validate_captcha’); // Described below

if ($this->form_validation->run() == FALSE) {
$data[‘captcha’][‘image’] = $this->session->userdata("image");
}
else {
if(!$this->session->has_userdata(‘filename’))
redirect("Test/my_form");

if(file_exists(BASEPATH."../assets/captcha/".$this->session->userdata[‘filename’]))
unlink(BASEPATH."../assets/captcha/".$this->session->userdata[‘filename’]);

session_destroy();
print "So, You are not a robot!";
exit;
}
}
else{
$data[‘captcha’] = $this->_generate_captcha(); // Captcha Generated using custom function defined below
$session_data = array(‘captcha’ => $data[‘captcha’][‘word’],
‘image’ => $data[‘captcha’][‘image’],
‘filename’ => $data[‘captcha’][‘filename’] );

$this->load->library(‘session’);
$this->session->set_userdata($session_data);
}

$this->load->view(‘myform’, $data);
}

function _generate_captcha(){
$this->load->library(‘image_lib’);
$this->load->helper(‘captcha’);

$options = array(
‘img_path’ => ‘./assets/captcha/’, // this directory needs to be created to store generated image
‘img_url’ => base_url("assets/captcha"), // absolute path to directory.
‘img_width’ => 200,
‘expiration’ => 7200,
‘word_length’ => 8,
‘font_size’ => 30,
‘img_id’ => ‘Imageid’,
‘pool’ => ‘0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ’,

‘colors’ => array(
‘background’ => array(255, 255, 255),
‘border’ => array(255, 255, 255),
‘text’ => array(0, 0, 0),
‘grid’ => array(255, 40, 40))
);

$captcha = create_captcha($options);
return $captcha;
}

public function validate_captcha(){
$this->load->library(array("form_validation", "session"));
if(strtolower($this->input->post(‘captcha’)) != strtolower($this->session->userdata[‘captcha’])){
$this->form_validation->set_message(‘validate_captcha’, ‘Wrong captcha code’);
return false;
}
else{
return true;
}

}
}
?>

[/php]

View

myform.php

[html]

<form method="post">
<?php print $captcha[‘image’] ; print form_error(‘captcha’); ?>
<input name="captcha" placeholder="captcha" type="text">
<button type="submit">Validate Captcha</button>
</form>

[/html]
Download the compressed source code from here (mirror).

 

You can reach Waqas Yousaf through twitter @wiqi.

Read More
Waqas Yousaf December 5, 2017 3 Comments

Change WordPress Admin Panel’s Footer Text

Wordpress admin footer

Default wordpree admin footer text

Basically, Any web developer (including myself) takes a step further when it comes to branding.  With the following code, You can change the old and boring wordpress’ footer text and replace it  your own message.

Just go to functions.php of your theme and add the following code.

[php] function my_admin_footer () {
print "Your Company Name. <a href=’#’>Visit Website</a>";
}

add_filter(‘admin_footer_text’, ‘my_admin_footer’);
[/php]

Happy Experimenting!

 

[alert type=”warning” close=”true”]You’ll have to edit your theme’s functions file. If you dont know how to do it, Check out WordPress’ Guide on functions.php before proceeding.[/alert]

Read More
Waqas Yousaf April 4, 2017 0 Comments

Removing WordPress Menu Items with Single Click

As a web developer working on website, All I know is time is money and during developing a website, there is one thing I hated the most. “Deleting menu items”. You see when I want to remove a menu item in WordPress, I go to [highlight2]Appearance -> Menus[/highlight2]  in admin Panel and then I remove the items one by one by expanding the menu item and using Remove to delete single item. Imagine when you have to remove an entire submenu consisting dozens of links. This exercise becomes excoriating painful.

The Solution

Meet One Click Remove Menu

  1. Just download and install this tiny plugin
  2. A little trash can button would appear on the menu item.
  3. Just delete as many items you want to without expanding and finding tiny remove link .

Thats it, Menu Item deleted.

 

 

Read More
Waqas Yousaf March 27, 2017 0 Comments

Reset WordPress Password | Video Tutorial

Breif Intro into Resetting WordPress Password?

I usually need to reset wordpress passwords because I set temporary passwords and usually forget the password or misplace it. Also, there are tons of queries on different freelancing sites where clients post queries likes password hacked or password forgotten and I (“The Client”) need to recover this password. So, Resetting wordpress password is something every web developor and web master must know if you are into wordpress development.

Having said that the own pre-req for this tutorial is the access to wordpress website’s database manager which is phpmyadmin most of the times. You can access phpmyadmin from website’s Cpanel account.

Instructions

  1. [highlight3]Click phpmyadmin[/highlight3]
  2. [highlight2]Select your wordpress’ database. (if you don’t know your database name, then look it up into w-config.php file in root)[/highlight2]
  3. [highlight3]Open users table with prefix (which is rh_ in my case)[/highlight3]
  4. [highlight2]Look for the user you are going after and click edit[/highlight2]
  5. [highlight3]You’ll see some gibberish text written in user_pass field’s value column. Don’t worry. Just write in your new password in value column.[/highlight3]
  6. [highlight2]Click on the function drop down and select MD5[/highlight2]
  7. [highlight3]Click go[/highlight3]

This is it. You have just reseted the password of your wordpress website. I have created a tutorial video. Check it out below!

Watch Video Tutorial to Reset WordPress Password

 

You can reach Waqas Yousaf through twitter @wiqi.

Read More
Waqas Yousaf March 13, 2017 0 Comments