Set Meta Tags (SEO Tags) in CakePHP

cakephp-freelancer-developer

Hello Friends,

In my previous post, i show you the way how to set Page Title Tag in CakePHP. But setting Meta keywords and Meta Description is not the same way as Meta Title. .Also Meta Keyword and Meta Description is important part of Search Engine Optimization. Refer to below syntax to set Meta tags in CakePHP.

<?php 
echo $html->meta('keywords','enter any meta keyword here');
?>
//Output <meta name="keywords" content="enter any meta keyword here"/>
<?php 
echo $html->meta('description','enter any meta description here');
?>
//Output <meta name="description" content="enter any meta description here"/>

If you find any problem in this than let me know by comment.

About Rakshit Patel
I am PHP Freelancer, Rakshit Patel AKA WordPress Freelancer working as PHP Programmer India. I am here to share all my developing knowledge, quick coding techniques, quick solutions to save your time and help you guys for any issue or bug fixing. If you have any PHP, WordPress, Magento related work, please contact me. I am interested for the work.

13 Comments on Set Meta Tags (SEO Tags) in CakePHP

  • Hetal Shah
    April 30, 2010 at 7:23 am

    Hi..
    Very nice well managed blog Rakshit. By profession I am SEO executive, so not understood much in this post about CakePHP. But I like that being a developer, you are learning SEO techniques. It will definately help you in future  lot. I am also learning some CMS and PHP now to expend my knowledge.

    Gerat to read your profile however you have not mention the company you are working for. anyways if I can help you anyway I will be glad doing that.
    Keep it up.

  • Hetal Shah
    April 30, 2010 at 12:53 pm

    Hi..
    Very nice well managed blog Rakshit. By profession I am SEO executive, so not understood much in this post about CakePHP. But I like that being a developer, you are learning SEO techniques. It will definately help you in future  lot. I am also learning some CMS and PHP now to expend my knowledge.

    Gerat to read your profile however you have not mention the company you are working for. anyways if I can help you anyway I will be glad doing that.
    Keep it up.

  • Rakshit Patel
    April 30, 2010 at 11:28 am

    @Hetal Thanks for Compliment.

  • Rakshit Patel
    April 30, 2010 at 4:58 pm

    @Hetal Thanks for Compliment.

  • Alex
    October 14, 2011 at 7:18 pm

    Hi,

    I have big troubles customizing my meta tags. I hope you can help me out. I currently use the following line:

    echo $html->meta(‘description’,$this->getVar(‘metaDescription’));

    But how can I put a default value in case the $this->getVar(‘metaDescription is empty?

    Cheers

  • search engine optimization
    April 5, 2013 at 2:22 pm

    I’m not sure the place you are getting your information, but great topic. I must spend some time learning more or figuring out more. Thanks for excellent information I used to be on the lookout for this info for my mission.

Leave a Reply

Your email address will not be published. Required fields are marked *

Sponsors

Sponsors

Recommended

DHgate Computers
DHgate.com - Computers, Cell Phones & more
  • We find everbuying built in php and use css to control the style.

About Author

PHP Freelancer

PHP Freelancer I am PHP Freelancer, Rakshit Patel working as PHP Programmer India. I am here to share all my developing knowledge with you people. For Hire PHP Developer India, contact me.
Follow on twitter: @raxit4u2

Get Free Programming Tutorials:

Become a Fan

Popular Topics

Recent Posts

Most Popular

Recent Comments

Get a Free Quote
$
$
$
Security Question: 3 + 8 = ?
$
 
Listing all pages