PHP webdeveloper and frontend developer



Order Custom Post Type by custom Field with Types Plugin in WordPress

Category : PHP, Wordpress · No Comments · by Oct 30th, 2015

First you need to choose which post type you want to list and to choose a custom field to filter by you use the “meta_key” key in the array. The key starts with “wpcf-” and afterwards the name of the custom field you want to use.

 

How to put inline javascript in the footer of your page with WordPress

Category : Web development, PHP, Wordpress · No Comments · by Jun 18th, 2015

You can do this by adding this code to your template file. This will add a hook. Your javascript code will now be placed in the footer of your page (or where the wp_footer() function is called).

 

Vagrant up errors on install on Mac OS X

Category : PHP, MySQL, Mac and Apple stuff · No Comments · by Jan 23rd, 2014

Instead of MAMP I use Vagrant to set up my virtualhosts locally. That way you can emulate your webserver’s setup. To configure my Vagrant virtual machine I use PuPHPet. You need to have VirtualBox installed for this. After downloading the  PuPHPet configuration manifest you need to start up the virtual box. You do this by executing this command:

 Sometimes I…

Tabindex problems with Gravity forms in WordPress

Category : PHP, Wordpress · No Comments · by Sep 21st, 2013

Sometimes there are problems with the tabindex when you use the Gravity forms plugin in WordPress. You can fix this by adding this to your theme’s functions.php file

 This will set the start index from gravity forms to a higher number.

Change the amount of tags in tagcloud in WordPress

Category : PHP, Wordpress · No Comments · by Sep 21st, 2013

Add this piece of code to your theme’s function.php file.

 Set the number of the amount of tags you want to display on your page. Or you can just use the parameters for the wp_tag_cloud function.

   

How to make a custom protected page in WordPress

Category : PHP, Wordpress · (1) Comment · by Jul 3rd, 2013

The default password form uses this message: “This post is password protected. To view it please enter your password below:”. You can use a custom text to display on a protected page by using a filter in WordPress. Add this code to your theme’s functions.php file:

 

Get the depth of the current page in WordPress

Category : PHP, Wordpress · (1) Comment · by Jun 26th, 2013

If you want to get the level of the current page in WordPress you can use this 

 This function will echo the depth of the current page. If the depth returned is zero then you’re on a parent page.

How to enable the WordPress maintenance mode

Category : PHP, Wordpress · No Comments · by Feb 17th, 2013

WordPress has a built-in maintenance feature. By adding a “.maintenance” file to your website’s root directory with the piece of code WordPress will trigger its maintenance mode.

This file is also used during the auto-update process. By using the maintenance mode, users will not see any error messages while you’re updating your WordPress installation or theme. It will generate…

Limit the number of post revisions in WordPress

Category : PHP, Wordpress · (3) Comments · by Feb 17th, 2013

For each saved edit made to a post or a page, WordPress saves a revision in the database. This can really increase the size of your database when your working with a lot of posts or pages. WordPress has a built-in revisions option which you can set in the wp-config.php file. You can also disable revisions altogether. To disable revisions…

Remove SEO title, keywords, description columns from the post and pages list when using the all-in-one-seo-pack WordPress plugin

Category : PHP, Wordpress · No Comments · by Nov 5th, 2012
Remove SEO title, keywords, description columns from the post and pages list when using the all-in-one-seo-pack WordPress plugin

I always use the all-in-one-seo-pack for WordPress websites which is a great plugin for SEO purposes. The only drawback is that it screws up the list of pages or posts in your WordPress admin section by adding three extra colums to it (SEO title, SEO keywords, SEO description). To remove these colums go to the /wp-content/plugins/all-in-one-seo-pack/ folder and look for…


s