Free Android CakePHP GMaps Articles by Bali Web Design

October 28, 2010

How to remove generator meta tag wordpress

Filed under: php,wordpress — admin @ 10:13 pm

Starting from wordpress 2.5 and above, you cannot remove generated meta tag wordpress version through your template. On prior version, it is simple by comment the line for showing wordpress version on your template.

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />

WordPress 2.5 and above, the version is moved into the core of the wordpress. So it will automatically generate metatag generate, such as

<meta name="generator" content="WordPress 3.0" />

If you want to remove this generated line, there are some ways :

  1. Login to administration wordpress page, and then go to Appearance > Themes, And then Editor. Open functions.php, Add this line before the closing ?> tag
    remove_action('wp_head', 'wp_generator');
  2. Or use this plugin. Install on plugins area.

September 4, 2010

How to redirect wordpress blog url cakephp

Filed under: cakephp,php,wordpress — admin @ 7:15 pm

Cakephp have great routing capability, i was install wordpress blog on my main website root directory. And then i need to move my blog into new folder, i put it on /app/webroot/blog/ because i build new web application on root directory using cakephp.

I use rewriting rule for my wordpress blog. The rule is I want to redirect into I don’t want to loose my blog visitors because the blog posting has good ranking on google.

So i do setting on app/config/routes.php and add this line

Router::connect(‘/:year/:month/:slug’, array(‘controller’ => ‘pages’, ‘action’ => ‘redirect_blog’), array(‘pass’ => array(‘year’, ‘month’, ‘slug’), ‘year’ => ‘[0-9]{4}’, ‘month’ => ‘[0-9]{2}’, ‘slug’ => ‘[A-Za-z0-9-]+’));


August 2, 2010

How to redirect /app/webroot/blog/ into /blog/ WordPress Cakephp

Filed under: cakephp,php,wordpress — admin @ 8:16 pm

At this time, a company website normally should have blog to post some business activity or related activity with website themes. WordPress is the best blog framework (CMS) that i ever used. When i was build web application under my own php framework, i wasn’t worried about integrating wordpress into my website. It would has separated setting with main application.

However, now i am using cakephp framework. And if we need to put file or folder, it need to be put inside app/webroot folder. So if i need to install wordpress blog in, i need to put the blog folder inside /app/webroot/.

The problem is about the url, with standard setting the blog would be redirected to not to This is not look good for visitor and also for seo. Because the folder structure is to deep.