Vertoh

  1. Home
  2. Docs
  3. Vertoh
  4. Frequently Asked Questions
  5. How can I make the register links to open in a new window?

How can I make the register links to open in a new window?

To open the register links on a new tab/window do the following:

1) Opened wp-content/themes/vertoh-child/header.php

4) Around line number 67, you can find:

<a href=”<?php echo $registration_calltoaction_url; ?>”><i class=”fa fa-ticket pull-right right-icon”></i></a>

5) Replaced this to:

<a target=”_blank” href=”<?php echo $registration_calltoaction_url; ?>”><i class=”fa fa-ticket pull-right right-icon”></i></a>

6) Copied wp-content/themes/vertoh/components/templates/headers/home/slider.php to wp-content/themes/vertoh-child/components/templates/headers/home/slider.php

7) Opened wp-content/themes/vertoh-child/components/templates/headers/home/slider.php

8) Around line number 51, you can find:

<a href=”<?php echo $registration_calltoaction_url; ?>” class=”section-button”><?php echo stripslashes($reg_widget[‘registrationcalltoactiontext’]); ?></a>

9) Changed this to :

<a href=”<?php echo $registration_calltoaction_url; ?>” class=”section-button” target=”_blank”><?php echo stripslashes($reg_widget[‘registrationcalltoactiontext’]); ?></a>

10) Opened wp-content/themes/vertoh-child/functions.php

11) Added the following code to the end of this file:

/*To change the parent nav menu items*/

function vertoh_child_remove_excerpt_filter() {

remove_filter(‘wp_nav_menu_items’, ‘vertoh_wp_nav_menu_items’, 10, 2);

}

add_action( ‘after_setup_theme’, ‘vertoh_child_remove_excerpt_filter’ );

add_filter(‘wp_nav_menu_items’, ‘vertoh_child_wp_nav_menu_items’, 10, 2);

function vertoh_child_wp_nav_menu_items($items, $args) {

$widget_ef_registration = get_option(‘widget_ef_registration’);

if ($args->theme_location == ‘primary’ && is_active_widget(false, false, ‘ef_registration’) && is_array($widget_ef_registration)) {

foreach ($widget_ef_registration as $key => $reg_widget) {

if (empty($reg_widget)) {

unset($widget_ef_registration[$key]);

update_option(‘widget_ef_registration’, $widget_ef_registration);

} elseif (isset($reg_widget[‘registrationshowtopmenu’]) && $reg_widget[‘registrationshowtopmenu’] == 1) {

$registration_topmenu_url = !empty($reg_widget[‘registrationtopmenuurl’]) ? $reg_widget[‘registrationtopmenuurl’] : ‘#tile_registration_anchor’;

$items .= ‘<li class=”register”><a target=”_blank” href=”‘ . $registration_topmenu_url . ‘” class=”section-button”>’ . stripslashes($reg_widget[‘registrationtopmenutext’]) . ‘</a></li>’;

break;

}

}

}

return $items;

}

12) Saved 3 files.

 

 

Was this article helpful to you? Yes No