add an icon to homepage service tab
-
I have a theme that i am customizing. I created 4 pages. On the homepage, below the featured slider, is a tabbed content area. Each tab is populated by one of my four pages.
I want to add icons to the top of the tabs. I tried to add a custom class. This worked, but it applies the same icon. I believe, I need to create an array to establish a new class for each tab. How is this done? here is the code that generates the tab array.<?php if (have_posts()) : while(have_posts()) : the_post(); ?> <?php $hash = 'service_' . strtolower( preg_replace( '/ /','_', get_the_title() ) ); $et_nova_settings = maybe_unserialize( get_post_meta( get_the_ID(),'et_nova_settings',true ) ); $tab_title = isset( $et_nova_settings['et_service_tabtitle'] ) && !empty($et_nova_settings['et_service_tabtitle']) ? $et_nova_settings['et_service_tabtitle'] : get_the_title(); $tab_subtitle = isset( $et_nova_settings['et_service_tab_subtitle'] ) && !empty($et_nova_settings['et_service_tab_subtitle']) ? $et_nova_settings['et_service_tab_subtitle'] : ''; ?> <li class="tw_iconset"><a href="#<?php #echo $hash; ?>"><strong><?php echo esc_html($tab_title); ?></strong><?php if ($tab_subtitle != '') { ?><span><?php echo esc_html($tab_subtitle); ?></span><?php } ?></a></li>
https://ghana.txtunited.com/public_html/
Notice the cloud icon, this is one of the 4 icons, I attached it by adding a class the<li>
tag called “tw_iconset” and styled it in style.css.How do I add the icons to the top of the tabs properly?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘add an icon to homepage service tab’ is closed to new replies.