Add Heart icon wishlist button aside cart icon
-
Hello, i cant figure how to make this work. I want the heart icon on the right side of the cart icon. I already used the following code snippet but still not showing the heart icon fot the wishlist:
/*
if( defined( ‘YITH_WCWL’ ) && ! function_exists( ‘yith_wcwl_add_wishlist_to_loop’ ) ){
function yith_wcwl_add_wishlist_to_loop(){
echo do_shortcode( ‘[yith_wcwl_add_to_wishlist]’ );
}
add_action( ‘woocommerce_after_shop_loop_item’, ‘yith_wcwl_add_wishlist_to_loop’, 15 );
}
*/What am i doign wrong? if i try to add a link in the menu, it goes right down below the main menu.
Here is how my functions.php is now:
/*
<?php
class child_theme {private static $_config;
public static function init(){
if (!class_exists(‘ssif’)){
require_once(get_theme_file_path(‘includes/dependencies.php’));
return;
}/* ELEMENTOS */
require_once(get_theme_file_path(‘includes/social-icons.php’));
require_once(get_theme_file_path(‘includes/widgets.php’));/* GOOGLE */
require_once(get_theme_file_path(‘includes/google-fonts.php’));/* IDIOMAS */
add_filter(‘ava_theme_textdomain_path’, __CLASS__.’::language_path’, 15);
add_action(‘after_setup_theme’, __CLASS__.’::textdomain_load’, 0);/* TEMA PAI */
add_theme_support(‘avia_disable_dummy_import’);
add_theme_support(‘avia_manual_updates_only’);
add_filter(‘kriesi_backlink’, ‘__return_empty_string’, PHP_INT_MAX);
add_filter(‘avf_debugging_info’, ‘__return_empty_string’, PHP_INT_MAX);
add_filter(‘after_setup_theme’, __CLASS__.’::enfold_no_debug’, PHP_INT_MAX);
add_filter(‘layerslider_disable_auto_update’, ‘__return_true’, PHP_INT_MAX);
add_filter(‘site_transient_update_plugins’, __CLASS__.’::disable_update’, 99);/* CLASSES DO HTML */
ssif_html_classes::register(‘avia_header_class_filter’, ‘html’);
//ssif_html_classes::register(‘avf_header_classes’, ‘html’);
add_filter(‘body_class’, __CLASS__.’::body_classes’, PHP_INT_MAX);/* ESTILOS E SCRIPTS */
add_action(‘wp_enqueue_scripts’, __CLASS__.’::scripts’);
add_action(‘admin_enqueue_scripts’, __CLASS__.’::scripts’);/* CONFIGURA??ES */
self::$_config = new ssif_config(
__CLASS__,
‘Outras Configura??es do ‘ . wp_get_theme()->name,
[
‘enfold_enable_image_overlay’ => [
‘label’ => ‘Habilitar todos os overlays de imagens’,
‘type’ => ‘checkbox’,
‘section’ => ‘child_general_settings_section’,
‘description’ => ‘Marque esta op??o para habilitar todos os overlays de imagens.’,
],
‘enfold_tabs_add_arrows’ => [
‘label’ => ‘Adicionar setas nas abas’,
‘type’ => ‘checkbox’,
‘section’ => ‘child_general_settings_section’,
‘description’ => ‘Marque esta op??o para adicionar setas nas abas.’,
],
],
[
‘sections’ => [
‘child_general_settings_section’ => [‘title’ => ‘Op??es Gerais’],
],
‘menu’ => ‘themes.php’,
‘menu_title’ => ‘Outras Configura??es’,
‘menu_prefix’ => ‘settings’,
‘menu_position’ => 99,
‘use_tabs’ => ‘js’,
]
);/* INCLUS?ES ADICIONAIS */
new ssif_loaders(
get_theme_file_path(),
get_theme_file_uri(),
‘child_theme’
);/* AVIA CONTROLES */
add_action(‘after_setup_theme’, __CLASS__.’::controls’);/* INICIA AS FUN??ES */
do_action(‘child_theme’);}
public static function language_path(){
return trailingslashit(get_theme_file_path(‘lang’));
}public static function textdomain_load(){
//$path = self::language_path();
//ssif_translate::textdomain(‘enfold’, null, false, $path);
//ssif_translate::textdomain(‘avia_framework’, null, false, $path);
$path = [
trailingslashit(get_parent_theme_file_path(‘lang’)),
trailingslashit(get_theme_file_path(‘lang’)),
];
foreach ($path as $dir){
ssif_translate::textdomain(‘enfold’, null, false, $dir);
ssif_translate::textdomain(‘avia_framework’, null, false, $dir);
}
}public static function enfold_no_debug(){
remove_action(‘wp_head’,’avia_debugging_info’, 1000);
remove_action(‘admin_print_scripts’,’avia_debugging_info’, 1000);
}/* Desativar atualiza??es */
public static function disable_update($value) {
return ssif_updater::list_remove($value, ‘layerslider/layerslider.php’);
}public static function scripts(){
$n = (is_admin() ? ‘backend’ : ‘frontend’);
ssif::enqueue_theme_style(__CLASS__, ‘css/’.$n.’.css’);
ssif::enqueue_theme_script(__CLASS__, ‘js/’.$n.’.js’, [‘jquery’]);
wp_add_inline_script(__CLASS__, ‘var ‘.__CLASS__.’ = ‘.wp_json_encode([
‘tabs_add_arrows’ => self::$_config->get(‘enfold_tabs_add_arrows’, false),
]).’;’);
}public static function controls(){
add_filter(‘avia_load_shortcodes’, __CLASS__.’::shortcode_template’);
/*
$dir = get_theme_file_path(‘avia’);
if (!($hdir = @opendir($dir))) return;
while (($filename = readdir($hdir)) !== false){
if (substr($filename, 0, 1) == ‘.’) continue;
if (strcasecmp(substr($filename, -4), ‘.php’)) continue;
if (@is_dir($path = (trailingslashit($dir) . $filename))) continue;
include_once($path);
}
closedir($hdir);
*/
}public static function shortcode_template($paths){
$paths[] = get_theme_file_path(‘avia/’);
return $paths;
}public static function body_classes($classes){
if (!self::$_config->get(‘enfold_enable_image_overlay’, false)){
$classes = ssif_html_classes::add_classes($classes, [‘disable_image_overlay’]);
}
return $classes;
}public static function config(){
return self::$_config;
}
public static function config_get($id, $def = null){
return self::$_config->get($id, $def);
}}
child_theme::init();if( defined( ‘YITH_WCWL’ ) && ! function_exists( ‘yith_wcwl_add_wishlist_to_loop’ ) ){
function yith_wcwl_add_wishlist_to_loop(){
echo do_shortcode( ‘[yith_wcwl_add_to_wishlist]’ );
}
add_action( ‘woocommerce_after_shop_loop_item’, ‘yith_wcwl_add_wishlist_to_loop’, 15 );
}*/
Please help! Thanks.
The page I need help with: [log in to see the link]
- The topic ‘Add Heart icon wishlist button aside cart icon’ is closed to new replies.