Skip to main content

Unanswered Questions

2,245 questions with no answers
2 votes
0 answers
357 views

Refresh Taxonomies

When saving/updating a custom post type in the Admin Panel I'm hooking into save_post_{$post->post_type} and adding custom taxonomy terms from a linked post using wp_set_object_terms. The terms are ...
2 votes
0 answers
1k views

How to add pagination to wpbakery grid?

I have a theme with wpbakery page builder. I made a page to display blog posts using wpbakery grid. But I would like to display 5 posts per page and to use ajax pagination. I display 5 posts per page ...
2 votes
0 answers
59 views

How to Replace Words with Hypertext Link But Ignore Previously Existed Links?

Auto-linking for "selected words" in the_content I am currently using the following code: function wp_affiliate_links($text){ $replace = array( '/ example /' => ' <a rel="nofollow" href="...
2 votes
0 answers
419 views

send_headers don't work on wordpress multisite

I have written a simple plugin to send some security http headers. I've tested it on various wordpress installations but on a wordpress multisite network it seems that the headers are not sended. The ...
2 votes
0 answers
175 views

Extending wp JavaScript base class to make a post request to a custom REST endpoint

I've defined a REST endpoint /my-plugin/v1/post-read to show whether a post has been read or not, per-user. In PHP, my plugin keeps track of this depending on page views while logged in. I'm now ...
2 votes
0 answers
147 views

How to return output of the new wp gallery block for automatically Link images To Media file

Sorry for the repeated questions but I didn't get any solution yet! I'm stuck with that!! I mange a multi writers blog, and all our users uploading some gallery images, and they didn't know the ...
2 votes
0 answers
85 views

Can an array be used as a meta_query value?

I'm trying to query a custom post type (courses) by grade using WP_Query and Advanced Custom Fields (ACF). Grades (checkboxes) are organized by term (groups). Four grades per term, four terms per ...
2 votes
0 answers
411 views

Display notification only once

I am trying to use the getItem and setItem method to display notifications in an array only once. It works for the first 5 notifications but once you go above 5 there are a few issues that arise. For ...
2 votes
0 answers
1k views

Displaying custom taxonomy on WooCommerce product page

I'm trying to create a WooCommerce bookshop for a client, and need to create a custom taxonomy for the books' authors. I've managed to get the taxonomy working in wp-admin by inserting the following ...
2 votes
0 answers
552 views

Wordpress blockquote removes `<br>` tag

So I have a quote in my page template and I would like to give the user the opportunity to add line breaks whenever they desire to do so. I wanted the blockquote to have an extra <p> tag inside ...
2 votes
0 answers
758 views

Search user metadata with checkboxes via ajax (almost working)

I have created an ajax search form following some tutorials online, it is working but not exactly how I need it to. Here is where I got the search from. I have US states setup as a user meta field ...
2 votes
0 answers
2k views

Filter custom post type archive page with custom taxonomies (categories) with AJAX

I've created a custom post type (projects) with different custom taxonomies (projects' categories). I would like to create a categories' filter but with AJAX, so without reloading the page every ...
2 votes
0 answers
840 views

Auto Load New Posts

Currently pulling in my posts on to a static page via ajax and a wp page template. <?php get_header(); ?> <div class="row"> <div class="col-md-6 feed-left"> <div id="post-list"&...
2 votes
0 answers
2k views

admin-ajax.php returning error 400 namespaced callback

I'm writing a plugin and I'm getting an error 400 Bad Request from admin-ajax.php. I did some poking around in the Wordpress core about this and it seems where it's getting hung up is around line 85 ...
2 votes
0 answers
3k views

Woocommerce update product price via AJAX

I'm trying to update price of a product added to CART. I can easily change quantity in the CART, but price doesn't work at all. function total_count($cart_object){ $total_cart = intval($_POST['...

15 30 50 per page