Calling Widgets Using PHP. WordPress

I want call a widget in my WordPress installation using a PHP function or shortcode, directly from a template. I need to call this plugin directly from a template, but there is no shortcode or PHP...

Woocommerce Product variations not saving

Am using woocommerce I justover write one function using hook because I need to calculate the price of each product using a formula so what I did is I just copy the original function modified it...

PHP Warning on wp_insert_post() at wp-includes/kses.php

I'm using wp_insert_post to take the html of a file and automatically create a post. I have a function that searches a directory, opening and extracting the correct html. The files have dates...

How to add a menu item to the front page of a site?

I'm looking for a bit of help with a site that I'm working on that uses WordPress as a CMS. Basically, I am attempting to add a menu item called 'Mood Boards' to the front page of this site, so...

Wordpress Divi Theme Link to Filtered Portfolio Category

I'm using the current version of the Divi 2.0 theme and Wordpress. The theme uses a filterable portfolio gallery that a user can click to filter between categories. The links are # and instead I...

$wpdb ajax call for search and pagination (custom post type)

I have created a custom post "news" in Wordpress and I want to search posts and paginate them without page reload. I.m using $wpdb class and it is now working fine but when I try to do an ajax...

flex container not equally distributing space so that flex items are equally sized

I'm having a problem with flexbox displaying properly in a wrapper. In my code below you'll see that the middle .wrap container does not equally distribute space so that the individual flex...

How to write a more efficient query to get child categories and paginate

I'm using this code to show only child categories and paginate them, but this is horribly slow (49 queries in 9,799 seconds.). I know that I'm doing this by using relying built-in Wordpress...

Ajax search functionality that includes data from Advanced Custom Fields

I'm trying to create a search function in Wordpress that uses AJAX to display both posts and a custom post type. So far I've managed to get almost everything working as I want it to, but searches...

Woocommerce 3 $product->qty is throwing error, can't figure out correct getter

I had a function that was setting category minimums and maximums. It was working until I upgraded to Woocommerce 3.0. I don't think the upgrade should have caused it to stop working. It's throwing...

Adding recipients to Woocommerce email notifications based on product variation term

I have created a Woocommerce plugin and require it to do two things: Send a notification message to a specific email address, based on which product variation is in the cart. The email must...

jQuery UI Autocomplete for WordPress table

I´ve created a table in WordPress called 'diseases' and I want to access to it with a autocomplete input from a plugin. jQuery UI Autocomplete 1.11.4 is already included. There is no error but...

Wordpress AJAX Filter with CPT UI and multiple taxonmy

I created an AJAX filter for my WooCommerce products. This was working when I used Toolset Types, but now is not while using CPT UI (Custom Post Type UI) to create the custom taxonomy. When I...

Send php value with jQuery ajax function to php function

I have an ajax form that filters posts based on the category. Setup: HTML form PHP function to echo ouput jQuery ajax request to load php function Question: How can I parse a value to the php...

Add "show all" option to AJAX filter (Wordpress)

I've followed this guide on how to create a AJAX filter for posts that sorts the posts by categories and displays them dynamically in a div. I've modified the code to also display a subcategories...

wordpress ajax load more with multi-category filter

I followed the tutorial from here. But I want to make it to filter multi categories/taxonomies with ajax load more. After I set the filter, when I click load more it will show all category posts,...

Wordpress category order by custom field(done). How to output custom field only once

I create a catalog of companies by cities using the Wordpress categories. Categories are cities. Custom field is a region in which cities are included. For custom field used - Advanced Custom...

Filter posts by multiple taxonomies using checkbox and select

Hey so I'll try to make this quick. I'm trying to filter my custom post type(attractions) with two different taxonomies(city and category) in a front end form using a select dropdown and...

'key' meta_query not working custom advanced search (WordPress)

Been trying for hours now and have almost got to breaking point. Tried so many different things but can't seem to get my custom search bar to query results by a pre-defined select price range. I...

Posts by tag - Creating a reset

I have a rather neat filter tag that will narrow down results in a specific post category to just the posts within that category that have the selected tag. I am struggling to get the stock...

How to create a woocommerce product from frontend form submission with form validation

Help Needed: I'm trying to create a form that will publish a wooCommerce product from front-end after following this question (Add Woocommerce Temporary product). The issue i'm facing now is that...

WordPress | Post Query | Query on post categories to create sub-category filter and applying it to an Ajax filter in my function file

I'm struggling to get my portfolio page's filter to work. I have quite a good knowledge of WordPress and cannot seem to... Aims: Create a filter with only the categories that are a subcategory of...

ACF repeater field on Custom post type taxonomy returns errors (Timber theme)

I have created a custom post type and its taxonomy. I also have ACF repeater image field to the taxonomy, but every time when I add image to the field, there are errors like this. PHP Notice: ...

How to get Wordpress post filter (misha_filter_function) to filter CPT categories associated by a tag

Edited for Clarity: I'm using the misha_filter_function from: https://rudrastyh.com/wordpress/ajax-post-filters.html to filter posts. The initial array is displaying the correct posts by the...

custom taxonomy pagination 404 (attachments)

I created a taxonomy for the media area, so I could assign all my images to specific categories. All is working fine with my taxonomy page, until I try to go to page 2, at which point, it throws a...

Wordpress AJAX submit results opens in admin-ajax.php instead of content div

So, I have a problem with wordpress's AJAX handler. This is my form here: form action="<?php echo site_url() ?>/wp-admin/admin-ajax.php" method="POST" id="filter" name="filter"> <input...

Wordpress - Filtering Custom Post Type by multiple Custom Taxonomies on front end

I'm trying to allow users to select criteria from multiple custom taxonomies in order to filter a custom post type on the front end via a from with multiple selects. My problem is that the code...

Loading spinner typeaheadjs bloodhound tagsinput

I've setup an autocomplete search form with bloodhound and tagsinput. It works well in remote but suggestions take about 1 or 2 seconds to show with Wordpress API. I'd like to add a loading...

How to execute two actions with one ajax call - WordPress

I have a section for "tours" in my page. The tours have 2 filters (select inputs). "destino" and "duracion" (location and duration) So far I made one of the filter work with ajax, and update the...

Wordpress filtering custom post type taxonomy

I've been following this guide: https://rudrastyh.com/wordpress/ajax-post-filters.html#comment-908. I've got a custom post type called "project" and a taxonomy called "producten". What i'm trying...