Wednesday, 28 December 2016

How To Display Author Bio in WordPress

After login in WordPress login panel. Add Social Media Profile Box To User Profile:- Copy the below into your "functions.php" file to add input boxes for the user social media profiles. /*=====================================================================    * Add Author Links  * ====================================================================*/ function add_to_author_profile( $contactmethods ) { $contactmethods['rss_url'] = 'RSS URL';...

Contact form 7 Email body HTML Structure code

Style 1:- Enquiry from Website Name: [your-name] Email: [your-email] Contact No: [tel-no] Message: [your-message] This email sent from "#". ...

BbPress links shortcode in WordPress

Below given shortcode for Profile  => [BUDDYUSER-PROFILE text='Edit Profile'] Friends  => [BUDDYUSER-FRIENDS text='My Friends'] Activity => [BUDDYUSER-ACTIVITY text='My Activity'] Add following code in your theme "functions.php" file. /** bbpress profile link shortdode "[BUDDYUSER-PROFILE text='Edit Profile']" **/ add_shortcode( 'BUDDYUSER-PROFILE', 'cuser_profile_shortocode_handler' ); function cuser_profile_shortocode_handler( $atts ){ $atts = shortcode_atts( array(...

Any defined user role redirect to homepage after login in Wordpress

Paste this function into your themes "functions.php" to redirect every specific user role from the admin back to your homepage: add_action('admin_init', function() {         $wp_user = wp_get_current_user();         if(isset($wp_user->caps['subscriber']) && $wp_user->caps['subscriber']){         wp_redirect(get_site_url());         exit;  ...

Create custom user roles in WordPress

Methode 1:- Add following code in "functions.php" file // Add a custom user role $result = add_role( 'client', __('Client' ), array( 'read' => true, // true allows this capability 'edit_posts' => true, // Allows user to edit their own posts 'edit_pages' => true, // Allows user to edit...

Create an admin user by using database in WordPress

1. To begin, log into your cPanel interface. 2. From the main cPanel screen, find the Databases category and click on the icon entitled phpMyAdmin. 3. Once the first screen appears, look to the left hand sidebar and click on the database for your specific WordPress installation. If...

IF template name is this then do this in WordPress

Just add following code where you need. if ( is_page_template('template_file_name.php') ) {     // Returns true when 'template_file_name.php' is being used. } else {     // Returns false when 'template_file_name.php' is not being used. } ?> ...

Notice Undefined offset error Solution in WordPress

Method 1:- Please deactivate the wp debug mode. Open up wp-config.php and replace: define( 'WP_DEBUG', true ); with define( 'WP_DEBUG', false ); Method 2:- Put following code in "functions.php" file. error_reporting(0); @ini_set(‘display_errors’, 0); ...

 

Copyright @ 2016 IT New Code | Developing Code | Designing Code.

Designed by: Templateism