Change woocommerce product addons position in the product page

For anyone wanting to do this outside of the plugin, to future proof this from updates, you can use the global var in place of the $this add_action( ‘woocommerce_after_add_to_cart_button’, array( $GLOBALS[‘Product_Addon_Display’], ‘display’ ), 10 ); add_action( ‘woocommerce_before_add_to_cart_button’, array( $GLOBALS[‘Product_Addon_Display’], ‘totals’ ), 20 );

Custom template not working for existing pages [closed]

as a solution, you can fully automate the selection of a template for a group of pages using slug names: add_filter(‘request’, function( $vars ) { $slug = explode(“https://wordpress.stackexchange.com/”, explode(‘?’, $_SERVER[‘REQUEST_URI’])[0]); array_pop ($slug); $temp_base = “…first_part_template_name…”; $temp_slug = array_pop ($slug); if (file_exists(get_template_directory().”https://wordpress.stackexchange.com/”.$template.’-‘.$temp_cat.’.php’)) { get_template_part( $temp_base, $temp_slug ); } }

create template for one page

Edit your “page-contactWohnsinn.php” file, And add this code to top of the file, <?php /** * Template Name: Contact Wohnsinn * * @package WordPress */ ?> and go to you page that you created in wp-admin, choose the template “Contact Wohnsinn” from right side options… and you are done..

WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered

in your code: $labels = array( ‘name’ => _x( ‘Locations’, ‘info_locaiton’ ), ‘singular_name’ => _x( ‘Location’, ‘info_location’ ) ); use this: $labels = array( ‘name’ => _x( ‘Locations’, ‘info_location’ ), ‘singular_name’ => _x( ‘Location’, ‘info_location’ ) ); In $labels variable name array value has different slug. I think this can be a problem. So, you …

Read more