Insert into db with foreach problem

(See comments) $wpdb->insert( ‘produse’, array( ‘id’ => $post_id, ‘pret’ => $produs[‘pret’], ‘gramaj’ => $produs[‘gramaj’], ‘numar_produs’ => $produs[‘numar_produs’] ), array( ‘%d’, ‘%s’, ‘%s’, ‘%d’ ) );

WP Supersized & Easy Fancybox Conflict

I spotted out the answer for this. Here is the culprit the culprit: the jquery.animate-enhanced.js file that had been added since version 3.1.2 is creating the issue. Comment out this line : wp_register_script(‘jquery_animate_enhanced’, content_url().’/plugins/wp-supersized/js/jquery.animate-enhanced.min.js’,array(‘jquery’),self::supersized_jquery_animate_enhanced_version) probably on line 55 in this file: wp-content/plugins/wp-supersized/includes/WPSupersized.php This is working for me now.

Show subcategories and hide posts or show posts if not exists subcategories

I would use a combination of get_categories and get_category_children to achieve this. For example: On the home page include something like this: <?php $args=array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’ ); $categories=get_categories($args); foreach($categories as $category) { $catChildren = get_term_by($category->ID, ‘category’); if(!empty($catChildren)) { echo ‘<h3><a href=www.yourwebsite.com/”‘ . $category->slug . ‘”>’ . $category->name . ‘</h3>’; } } … Read more

AJAX function needed (toggle text) [closed]

I do not think you need any AJAX here, You can do this also using jQuery Slide method. http://docs.jquery.com/UI/Effects/Slide Try here http://www.w3schools.com/jquery/jquery_slide.asp http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_slide_down

Woocommerce add product variations block to my custom template

No afraid not, there really isn’t a hook/filter that displays the variations. If you’ve copied all the template files to your themes directory you need to look at ..THEME..\woocommerce\single-product\add-to-cart\variable.php to see how WooCommerce displays the product variations.

Hover images and Videos

At first blush, it appears that you are missing a colon from your else statement. Without more info, though, I cannot tell you anything else. <?php if( has_post_thumbnail() ) : ?> <div class=”image-wrapper-hover”> <?php the_post_thumbnail( ‘large’ ); ?> </div> <?php else : ?> <?php catch_video();?> <?php endif; ?>

Notifications Bar on home page only

Using the very example from the Codex in the Settings API section. Put it in the theme’s functions.php: add_action(‘admin_init’, ‘eg_settings_api_init’); function eg_settings_api_init() { add_settings_section( ‘eg_setting_section’, ‘Example settings section in reading’, ‘eg_setting_section_callback_function’, ‘reading’ ); add_settings_field( ‘eg_setting_name’, ‘Example setting Name’, ‘eg_setting_callback_function’, ‘reading’, ‘eg_setting_section’ ); register_setting(‘reading’,’eg_setting_name’); } function eg_setting_section_callback_function() { echo ‘<p>Intro text for our settings section</p>’; } … Read more

Add Category Descriptions to Montezuma Theme

The WordPress template hierarchy indicates that index.php is the template used, if category.php and archive.php are missing. So, you can insert your code in index.php, and wrap it in a is_category conditional to make sure it’s only executed when a category archive is being displayed: <?php if( is_category() ) { // category description } ?>