Joined June 2014
·

Mike Shaw

Komodo Digital
·
Newcastle
·
·

Posted to Limit Login Attemps over 1 year ago

I would recommend https://wordpress.org/plugins/better-wp-security/. It covers login attempts along with a good few other security tasks

Nice function, just for keeping it explicit would ischildof be a more descriptive name?

Posted to Wordpress - Local or live database over 1 year ago

Aye, that looks good that

Just to add another idea to the mix, Mark Jaquith (in his WordPress skeleton: https://github.com/markjaquith/WordPress-Skeleton) has a local-config file. In his wp-config file he does a file_exists check for it which will load in different settings

Posted to Wordpress - Local or live database over 1 year ago

Cheers for the props :)

WordPress provides the is_singular() function for checking the current post type(s):

http://codex.wordpress.org/Function_Reference/is_singular

Hope it's useful :)

Posted to Wordpress load jquery in the footer! over 1 year ago

You need to be careful with doing this, as some plugins load jQuery dependent scripts into the header of your site which can cause problems.

However, if this isn't an issue you should definitely place jQuery into the footer

When registering a custom post type, you should set the 'supports' argument. If you don't want featured images, make sure the supports array doesn't contain 'thumbnail'

See this codex page, http://codex.wordpress.org/Function_Reference/register_post_type, and look for the supports argument (it'll explain it better than I can!)

WordPress has the ABSPATH constant, which it sets in wp-config.php, which stores the path to the WordPress root directory. Is this what you're trying to access?

Posted to Wordpress - Local or live database over 1 year ago

You could also put other settings such as WP_DEBUG in your switch, so your dev environment will always have debugging turned on and your live one won't

Posted to Wordpress - Local or live database over 1 year ago

If you have multiple environments, you could also use gethostname() and a switch statement to swap between connection details as appropriate

Achievements
1 Karma
0 Total ProTip Views