Month: February 2017

How to Hide VC Menu from Admin Dashboard

Write the code on functions.php

[php]
function vc_menu_page_removing() {
remove_menu_page( ‘vc-general’ ); // vc menu slug
}

add_action( ‘admin_menu’, ‘vc_menu_page_removing’ );
[/php]

How to Move Comment Textarea Bottom in WordPress

To move the Textarea field of comment form in WordPress, write the code in functions.php

[php]

function neon_move_comment_field_to_bottom( $fields ) {
$comment_field = $fields[‘comment’];
unset( $fields[‘comment’] );
$fields[‘comment’] = $comment_field;
return $fields;
}

add_filter( ‘comment_form_fields’, ‘neon_move_comment_field_to_bottom’ );

[/php]

How to Create Host Name on Ubuntu?

Open your termina:

ctrl+alt+t

Edit your host file

#sudo nano /etc/hosts

Set your Host Name:

127.0.0.1 HostName

Save the file:

ctrl+o

Enter

ctrl+x

Now you can set your host name as domain on Ampps by adding new domain.

How to Get Back Sublime Text 3 Menu

Sometimes we hide sublime text editor’s top menu. But there is no graphical option get back the menu. The task you have to do to get the menu is –

Ctrl + Shift + P

Then type–

VM or vman

you will see:

View: Toggle Menu

Select it and press enter.

Finish!

How to show image from CodeStar Metabox

The non-repeatable image field creation:

[php]
$options[] = array(
‘id’ => ‘_custom_category_options’,
‘post_type’ => ‘category’, // or array( ‘category’, ‘post_tag’ )
‘context’ => ‘normal’,
‘priority’ => ‘default’,
‘sections’ => array(
// begin: a section
array(
‘name’ => ‘section_1’,
‘title’ => ‘Section 1’,
‘icon’ => ‘fa fa-cog’,

// begin: fields
‘fields’ => array(

// a field
array(
‘id’ => ‘sponsors_image’,
‘type’ => ‘image’,
‘title’ => ‘Clients Logo’,
),

), // end: fields
), // end: a section

),
);
[/php]
02. Calling the image on front-end:
[php]

  • How to create image gallery with CodeStar Metabox?

    1.Creating Gallery field:

    // a field
    array(
       'id'          => 'gallery_2',
       'type'        => 'gallery',
       'title'       => 'Logos of the happy clients',
       'add_title'   => 'Add Images',
       'edit_title'  => 'Edit Images',
       'clear_title' => 'Remove Images',
    ),

    Read More “How to create image gallery with CodeStar Metabox?”