Calling custom PHP from a HTML form post action gives 404 error

Add unique field in your form. Eg: <input type=”hidden” name=”wdm_action” value=”1″> Put your ‘customer-details.php’ file code in below function:- add_action(‘template_redirect’,’wdm_customer_details’){ //check if that field present in the form, if yes then perform the action if(isset($_POST[‘wdm_action’] && $_POST[‘wdm_action’] != ”){ //customer-details.php file code } }

Woo-Commerce Send mail by code. [closed]

After doing some research on google and woocommerce code i found the ans of the what i what. i have use following function for to send the mail to the user once order have been generated using the custom code in wordpress woo-commerce. WC()->mailer()->emails[‘WC_Email_Customer_Processing_Order’]->trigger($orderId);

How to display category list with category description

Use this instead of wp_list_categories( $args ); wp_list_categories( $args ); It will display the category with formatted results like <ul><li> $categories = get_the_category(); This will returns the all category assigns to the current post and store in $category variable. Then you can display as in you listed format $page_custom_image = get_field(“your_custom_field_name”, “texonomyname_” .$category->term_id);

Help with “Recent Posts” Loop that is specific to a topic

Put this in your sidebar template where you want the listing to show up. Alternatively, you could use a plugin that allows you to run php in widgets and then place directly in a widget box, but that’s not always wise. <?php $categories = get_the_category(); $category = $categories[0]; $category_id = $category->cat_ID; $args = array(‘category__in’ => … Read more

How to add contact form instead of checkout

Checkout Deletion I guess you are using Woocommerce even though you did not mention it. I didn’t understand why you want to delete the checkout page, but to do so, just go to Pages under the WordPress admin dashboard, and delete the checkout page. Contact Form Installation To add a contact form to your WordPress … Read more

Add Javascript/Html into a WordPress

This plugin allows custom JS and custom CSS on a per post/page basis. https://wordpress.org/plugins/art-direction/ If you find that it is not compatible with your WP install, look for other plugins that allow custom JS and CSS. If you’re looking for a more robust solution, you can do something like the following: /* overlay-contact-form.css */ #overlayContactForm … Read more