Call function with button and return response

Based on the limited detail of your question something as per the following is a rough gist of what you could do. In your theme functions.php file: <?php function handle_request () { if (isset($_GET[‘custom_id’]) && isset($_GET[‘custom_id_nonce’]) ) { if ( wp_verify_nonce($_GET[‘custom_id_nonce’], ‘custom_id_action’) ) { $id = $_GET[‘custom_id’]; // FIRST // do something with $id // … Read more

How to add a template – so that i can choose a different menu for some pages

You can add a new template with a different header. <?php /* Template Name: CustomPageT1 */ ?> <?php //different header for different menu get_header(‘header_name’); ?> <div id=”primary” class=”content-area”> <main id=”main” class=”site-main” role=”main”> <?php // Start the loop. while ( have_posts() ) : the_post(); // Include the page content template. get_template_part( ‘template-parts/content’, ‘page’ ); // If … Read more

How do I bring a page template into a new theme with separate styling?

The problem is that your theme still load the main style.css sheet, because it is called by wp_head(). See the documentation here So, in order to not load your theme main stylesheet, you have to add to your functions.php file : add_action( ‘wp_enqueue_scripts’, ‘yolo_my_custom_template’ ); function yolo_my_custom_template(){ if ( is_page_template( ‘name_of_your_page_template.php’ ) ) : wp_deregister_script(‘twentynineteen-style’); … Read more