Digex
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Can I move the wp-config file to another serverI will change the way I work with wordpress files. I will limit access priveledges to ftp and database.
Forum: Plugins
In reply to: How do I use wp_register_script() and wp_enqueue_script() functions1. The url https://bit.ly/1Ea2wqT
This shows where the plugin works, but template is broken.2. The second url https://bit.ly/1BuC3mT
This shows where the template works, but the plugin is brokenThe plugin is Screets X Live chat in the bottom right corner.
Did you find a solution?
Forum: Plugins
In reply to: [Resume Submissions & Job Postings] How to Edit Form – Which Files to Touch?Did you find the file?
Forum: Hacks
In reply to: add an icon to homepage service tabI ended up with this.
<?php $myCounter = 0; $myClass = "tabClass"; ?> <?php if (have_posts()) : while(have_posts()) : the_post(); ?> <?php );$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'] : ''; $myCounter++; $myClass = "tabClass" . $myCounter; ?> <li><a href="#<?php #echo $hash; ?>" class="<?php echo $myClass; ?>"><strong><?php echo esc_html($tab_title); ?></strong><?php if ($tab_subtitle != '') { ?><span><?php echo esc_html($tab_subtitle); ?></span><?php } ?></a></li>
Working like a charm!
Forum: Hacks
In reply to: add an icon to homepage service tabThank-you esmi,
Thanks for the pseudocode. I still need some help understanding the logic. Here goes…
Applying a counter variable to the tab loop. Increment for each tab (4 loops) > Add current value to class name.What element or selector is the class applied to. How is it applied?
This is my attempt at writing incremental class variable
class TabClass { public static $counter = 0; function __construct() { self::$counter++; } } new TabClass(); new TabClass(); new TabClass(); new TabClass(); echo TabClass::$counter; ?>
Does this need to be included into the existing loop. Do I need to be concerned with WordPress syntax? I guess I
‘ll find out if it breaks! This is my first site. Learning PHP, please bear with me. I’m jumping right in!