Move plugin pages from dashboard to front-end
Move plugin pages from dashboard to front-end
Move plugin pages from dashboard to front-end
I finally got the widget built. I hope this will help another newbie. <?php /* * Plugin Name: Events Widget Description: This widget allows the user to select an Event name. Version: 0.5 Author: Dan Statham */ function gdd_Events_load_widgets() { write_log(‘gdd _Events_load_widgets’); }// gdd_Events_load_widgets // Register the widget function my_register_events_widget() { register_widget( ‘gdd_Events_load_widgets’ ); } … Read more
I am looking for a similar thing at the moment and am investigating 2 different plugins: https://codecanyon.net/item/woocommerce-checkout-location-picker/6811588 https://wordpress.org/plugins/checkout-address-sugessions-for-woocommerce/ I will be trying out the second plugin first, as it is free. Hope that helps (UPDATE) Neither of the above plugins did the job unfortunately, I would not recommend
If user has clicked link add class and store using PHP/Wordpress
get_the_author_meta( ‘ID’ ) just return 1
You should be able to use a relative URL. window.location.replace(“/contact-us”); If that code was run on any page on example.com, it would redirect to example.com/contact-us
Do I understand problem correctly? [QR1] -> Scan -> [Claim listing] -> [QR1->QR2 claimed] -> [QR2] Here what comes to mind class RenderPage function gen_qr(is_claimed) if (is_claimed) return generate_qr2; else return generate_qr1 function display_page() $qr_code = gen_qr(get_option(‘<page_id>_qr’)); // on button click update_option(‘<page_id>_qr’) It’s a bit schematic, but I think you got the idea. P.S. Just … Read more
You have to use get_results() instead of WP_Query. I have made changes in your code and tested at my end and it is working for me. I have also save that value using update() function of widget. You can take reference from below code. public function form( $instance ) { if ( isset( $instance[ ‘mydropdown’ … Read more
Adding: global $post; print_r ($post); alone, won’t work in functions.php (becuase WP’s core functions etc wouldn’t be loaded). It would inside a relevant template file, but not in functions.php. To make it work in functions.php, you need to do it inside an function that is hooked to an appropriate hook. The “appropriate” hook may depend … Read more
I did it. The “stock.available-on-backorder.step-1” is the css class of the availability text ( Available- made to measure ). <?php add_action( ‘woocommerce_before_add_to_cart_quantity’, ‘made_to_measure’ ); function made_to_measure() { global $product; if ( $product->is_type(‘variable’) ) { ?> <script> jQuery(document).ready(function($) { $(‘input.variation_id’).change( function(){ if( ” != $(‘input.variation_id’).val() ) { //var var_id = $(‘input.variation_id’).val(); var pa_size = jQuery( “#pa_size” … Read more