Add content on the Top of the Website.

Please Follow these steps:

1) Please add this code in the wplms-customizer.php file present in your wplms customizer plugin.

add_filter('vibe_option_custom_sections','custom_wplms_section',9,1);
function custom_wplms_section($sections){
  $sections[1]['fields'][] = array(
    'id' => 'header_notification',
    'type' => 'editor',
    'title' => __('Add Content on Top', 'vibe'), 
    'sub_desc' => __('Add Content on top of Website', 'vibe'),
    'desc' => __('', 'Wplms'),
    'std' => ''
    );
  return $sections;
}

add_action('template_redirect','custom_content_top',1);
function custom_content_top(){
  $content = vibe_get_option('header_notification');
  if(strlen($content) >= 1)
  echo '<div class="container"><div class="row"><div class="note">'.do_shortcode($content).'</div></div></div>';
}

2) Now go to wp-admin->wplms->header: At the bottom you will see a new field  “Add content on Top”, refer: http://prntscr.com/9xyjft

3) Now save the changes, and visit your site, you can see the content on the top of the website.

Was this article helpful?

Related Articles

1 Comment

  1. sanjay_k

    Hello,
    if i am not using “wplms_modern” , then can i replace with the theme name which i am using.
    Please explain.
    regards,
    sanjay

Leave A Comment?