PHP webdeveloper and frontend developer



Remove the ‘screen options’ and ‘Help’ from the WordPress admin section

Category : PHP, Wordpress · (4) Comments · by Nov 4th, 2012

Removing the ‘Screen options’ tab You can remove the ‘screen options’ tab completely from your WordPress admin area by adding this to your theme’s function.php file

Removing the ‘Help’ tab You can also remove the ‘Help’ tab from the admin area in the same manner:

 

Change the length of the excerpt in WordPress

Category : PHP, Wordpress · No Comments · by Nov 4th, 2012

When you want a custom length of your excerpt add this to your theme’s function.php file and you can specify the number of words used in the excerpt

Get the Youtube or Vimeo image still from the video URL with PHP

Category : PHP · (2) Comments · by Nov 3rd, 2012

This is a handy function to retrieve the youtube of vimeo still from the video URL. To use the function you just need to pass the $url parameter to the function. The $size parameter is optional and will by default return the large image. If you pass “thumb” as size it will return a small still icon.  

 

Change login session time for PHPMyAdmin

Category : PHP, MySQL · No Comments · by Nov 3rd, 2012

To change the time when your login session gets expired go to the root of your phpmyadmin folder and find the file config.inc.php Now search for this variable -> $cfg[‘LoginCookieValidity’]  In my example I changed it to 5 hours. You should also check the session.gc_maxlifetime in you php.ini file. The lowest value of those two will be in effect.

Override the from email address and from name in WordPress

Category : PHP, Wordpress · No Comments · by Nov 3rd, 2012

This is useful when dealing with contact forms within WordPress. Just add these lines to your theme’s functions.php file and replace the variables $from_email and $from_name with your credentials.

 

Change domain of a wordpress website

Category : PHP, Wordpress · No Comments · by Nov 1st, 2012

What I find a major hassle when dealing with wordpress websites is to transfer the website from a development environment to a production environment. The domain you use in a development stage will be different from the one of the production website. Therefore you have to alter all the urls within the posts, the links of the posts and the…

Customize the wordpress admin and login page

Category : PHP, Wordpress · No Comments · by Nov 1st, 2012

Customizing the login section If you want to remove the standard WordPress logo from the admin login section you’ll need to load a new CSS file and override the standard login CSS styles.

 This will load the file login.css from your active theme folder. You now can override the standard css.  To remove the WordPress logo from the login…

Customize the Standard WordPress footer text

Category : PHP, Wordpress · No Comments · by Nov 1st, 2012

The default WordPress footer says “Thank  you for using WordPress”. If you want to use wordpress for a client website, this doesn’t look very professional. So lets remove that line or replace it with something else. To do this you’ll need to edit your theme’s functions.php file. Just add these lines to that file:

 

Disable the “please update now” message on the WordPress dashboard for non-administrators

Category : PHP, Wordpress · No Comments · by Oct 29th, 2012

Sometimes when other people like clients need to use the admin section of your wordpress you don’t always want them to be able to update to a newer version of wordpress because this can lead to problems with plugins. I you only want administrators to see the update message, add this code to your theme’s functions.php files:

Template to redirect to child page within the menu for WordPress

Category : PHP, Wordpress · No Comments · by Oct 28th, 2012

I create a file named template-redirect-page.php in my theme’s folder and add this code:

If I want my parent page to redirect immediately to the subpage I select this template in the admin section.


s