Pagination for div’s

You could accomplish something similar via custom javascript on the page. It would allow the user to move through the divs (five at a time) while remaining on the same page, similar to a carousel. The code would work something like this: Hide all of the divs by default (via css) On page load, loop … Read more

AJAX Not Working With WordPress Database properly

I think your problem is here: $like_the_post = intval( $_POST[‘like_the_post’] ); You’re relying on the user’s browser’s POST input to determine whether to increment or decrement the count. When a user quickly clicks the button, the AJAX call hasn’t yet completed and changed the form input from true to false (or whatever’s vice-versa). Additionally, this … Read more

Update only some custom user fields

I have found the solution do_action(‘edit_user_profile_update’, $current_user->ID); was the problem. After I commented it out the update went fine. do_action is a plugin hook and expected way more that the from gave: explanation

uploading a new theme to live server

As I have written in your post at StackOverflow board: Please look at Upload localhost changes to live server If you are only making file changes, you should copy the live site and set it up on a local wordpress server. On the local wordpress server, just edit the theme as you like, and when … Read more

‘posts_per_page’ in costum page type

0 isn’t a valid value for posts_per_page. WordPress will see it as empty and default to the posts_per_page option. If you want all the posts use nopaging or posts_per_page => -1. $query = new \WP_Query([ ‘post_type’ => ‘producenter’, ‘nopaging’ => true, ‘orderby’ => ‘rand’, ‘post__not_in’ => [$post->ID], ]); As far as why it’s only showing … Read more

Can form entries from a WordPress form go to a database

WordPress supports Custom Post types, because this isn’t just about the form, but about displaying the data and making it searchable by other users – https://codex.wordpress.org/Post_Types I would recommend you look up http://pods.io/ which would help create these custom post types also build relationships between two post types (or Pods as they call it). Also … Read more