Undefined variable & issue with smof_data

The variable $alignment is only being set conditionally by the following lines: if ( metadata_exists( ‘post’, $post_id, ‘pyre_page_title_text_alignment’ ) && get_post_meta( get_queried_object_id(), ‘pyre_page_title_text_alignment’, TRUE ) != ‘default’ ) { $alignment = get_post_meta( $post_id, ‘pyre_page_title_text_alignment’, TRUE ); } elseif ( $smof_data[‘page_title_alignment’] ) { $alignment = $smof_data[‘page_title_alignment’]; } If neither the if() nor the elseif() conditions are … Read more

Array sorting assistance

If you change the saved date format to YYYY-MM-DD HH:MM (always with leading zeroes). You can use the usort() array sorting function from php. usort( $array, function( $a, $b ) { return strcomp( $a[‘show_date_and_time’], $b[‘show_date_and_time’] ); } ); Without changing the date format you need a more complex compare callback: usort( $array, function( $a, $b … Read more

How limit the width of a fixed menu-bar on scroll?

You have another div controlling the full width background. You need to alter the css of that one if you want the width to look. This css takes the background off the full width div you have and put the background on the wrap div that you have maxing at 1200px; .lifestyle-pro-blue .nav-secondary {background:none;} .wrap{background-color:rgba(0,0,0,0.5);}

WooCommerce – Add product category below product price [closed]

Try this code. add_action( ‘woocommerce_after_shop_loop_item_title’, ‘add_product_cat’, 25); function add_product_cat() { global $product; $product_cats = wp_get_post_terms($product->id, ‘product_cat’); $count = count($product_cats); foreach($product_cats as $key => $cat) { echo ‘<span class=”category-title”> <a href=”‘. get_term_link( $cat->term_id ) .'”><span class= “category-title_’.$cat->slug.'”>’.$cat->name.’ </span></a> </span>’; if($key < ($count-1)) { echo ‘ ‘; } else { echo ‘ ‘; } } } Updated … Read more

Submit to itself don’t work

$formtxt .= ‘<form style=”width: 800px;” name=”time_booking” action=”#” onsubmit=”return validateCalendarForm();” method = “POST”>’; action is set to #. maybe that is the cause. try removing that. action=”” additionally a js function validateCalendarForm() is calling on form submit. so check console for errors too. and lastly refresh permalink structure