Posts

Download files from multiple URL s and download it as zip format

Hello friends, here is the code for how to download files from multiple url and download is as zip format in PHP. If you have any doubt in PHP function's please refer php.net. Let's start!!! We can give url's as array format like below <?php $urls = array( 'http://skidvis.com/WordpressCheatSheet.pdf', 'http://andywibbels.com/files/WordPress_Cheatsheet_v1.pdf' ); ?>

Get custom field value through shortcode

Creating wordpress short-codes is simple. We can access custom field value through shortcode, just follow the function.

Wordpress hidden options in admin side bar menu

This little piece of code does something pretty cool. This function will add an additional option to your settings menu. It will show you a complete list of all the settings you have within your database related to your wordpress site. The code below will only made this link visible to an admin user and hide it for all other users. // CUSTOM ADMIN MENU LINK FOR ALL SETTINGS function all_settings_link() {     add_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php'); } add_action('admin_menu', 'all_settings_link'); Another method you can simply go to the options page with this URL domain.com/wp-admin/options.php to access wordpress hidden options.

Include or exclude custom post types in wordpress search result

Defining post types in search query allows you to include or exclude the custom post types in wordpress search result. Just add this function to functions.php

Loading jQuery from the Google CDN

Customize the order of the admin menu

This code will allow you to reorganize the order of elements in the admin menu. All that you need to do is click on an existing link in the admin menu and copy everything before the /wp-admin/ URL. The order below represents the order the new admin menu will have.

Add custom fields in user profile

Place the code below into your functions.php file to add custom user profile fields. Edit or add lines as you see fit. Remember not to remove the line: return $contactmethods; otherwise this won't work.