Reading POST over admin-ajax.php

OK, so there are many problems with your code… But I’m pretty sure I know, where the major one lies… But first things first… You add your AJAX callbacks with this code: add_action( ‘wp_ajax_wilcity_handle_review_listing’, ‘address_save_postdata’ ); add_action( ‘wp_ajax_wilcity_handle_review_listing’, ‘address_save_postdata’ ); It doesn’t make sense to add the same function twice. It can be a mistake, … Read more

display a message if get form is empty

If anyone faces the same problem, its easy to display a message with have_posts() <?php if ( have_posts() ) { echo “Events gefunden”; } else { echo “Keine Events gefunden”; } ?>

Embedding Links to WPForms on a WP Page

Step 1: Go to YOURWEBSITE.COM/wp-admin/admin.php?page=wpforms-overview Step 2: Find the form you want to embed and copy the shortcode which appears on the page. Step 3: Edit the page on which you want to embed the form. Step 4: If you are using the Gutenberg editor, click on the “add block” icon (it looks like a … Read more

WPAdverts – How to limit form submission 10 per month

You can do it using get_user_meta and update_user_meta: $value = get_user_meta($user_id, ‘form_submission’, true); if (!$value) {$value = 1;} else {$value = $value + 1;} if ($value < 11) { update_user_meta($user_id, ‘form_submission’, $value); } else { // too many form submissions } You could also expand on this to store the submission month too if you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)