You need some basic knowledge of WordPress theme development to perform this task.
Requirements
- Vertoh theme installed and updated.
- Demo content imported and properly installed.
- A link to the registration page inside the site or external link.
That information should be on Appearance > Widgets > Homepage > Vertoh Child Registration.
- Child theme installed and active.
Note: If you already have a child theme be careful to not overwrite your changes. - FTP access to your site.
Steps
To open the register links on a new tab/window do the following:
- Overwrite theme’s header: From your Vertoh parent theme (wp-content/themes/vertoh), copy the file header.php to your child theme wp-content/themes/vertoh-child/. Edit the file wp-content/themes/vertoh-child/header.php around line number 108, you can find:
[html]
<a href="<?php echo $registration_calltoaction_url; ?>"><i class="fa fa-ticket pull-right right-icon"></i></a>
[/html]Replaced this to:
[html]
<a target="_blank" href="<?php echo $registration_calltoaction_url; ?>"><i class="fa fa-ticket pull-right right-icon"></i></a>
[/html] - Overwrite slider behavior: From your Vertoh parent theme, copy the file wp-content/themes/vertoh/components/templates/headers/home/slider.php to the same path in your child theme. Edit wp-content/themes/vertoh-child/components/templates/headers/home/slider.php. Around line number 51, you can find:
[html]
<a href="<?php echo $registration_calltoaction_url; ?>" class="section-button"><?php echo stripslashes($reg_widget[‘registrationcalltoactiontext’]); ?></a>
[/html]Changed this to :
[html]
<a target="_blank" href="<?php echo $registration_calltoaction_url; ?>" class="section-button"><?php echo stripslashes($reg_widget[‘registrationcalltoactiontext’]); ?></a>
[/html] - Overwrite navigation menu items: Edit the file: wp-content/themes/vertoh-child/functions.php. Add the following code to the end of this file (you don’t need to include the PHP wrapping code twice)
[php]
<?php//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;
}
?>
[/php] - Finally, update your child theme files: If you already have some editions into that child theme be careful to not overwrite your changes.