Unanswered Questions
3,253 questions with no upvoted or accepted answers
6
votes
0
answers
636
views
How to load paginated post pages via ajax
Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website ...
5
votes
1
answer
12k
views
wp_query->max_num_pages always returns 0 on custom post type
Hi there I am developing a theme where I have to load some posts with ajax, in my index page everything works properly, the problem is when I need to use it on custom post type, I pass the values for ...
5
votes
1
answer
4k
views
I want to load post content by categories using Ajax
I have question.
I would like to load post content, custom post, depends on category.
So first of all I would like to have drop down menu which will list all my categories then once user will select ...
4
votes
0
answers
76
views
Using Primary Color in Plugin Block
I'm developing a Gutenberg block, and I want the block to fit in as nicely as possible with the users site. So I'm trying to include as little styling of my own as possible, eg. allowing buttons to ...
4
votes
0
answers
280
views
Gutenberg Blocks - Attributes from comment delimiter or from HTML?
I wrote a custom block and am trying to better understand the interplay of the JavaScript and PHP on both front and back end regarding blocks.
Say I have some block that I want rendered dynamically. ...
4
votes
1
answer
5k
views
AJAX handler throws 400 (Bad request) - why?
I am trying to apply a "Load more posts" function to a post loop, but I am dealing with a 400 Bad request, when admin-ajax.php is referred to.
The reference I used is this - https://rudrastyh.com/...
4
votes
1
answer
117
views
How do I get the total number of categories in a list of search results?
I want to display the total count of categories in a set of search results.
For example, "10 posts found in 3 categories." (Assuming that each post has only 1 category.)
Right now, my solution is to ...
4
votes
1
answer
51
views
Prevent Deletion of Blogs
I'm trying to prevent the deletion of blogs in a WordPress Multisite installation. There is already a plugin that does this, but it uses wp_die() as the solution, which in my scenario does not work.
...
4
votes
1
answer
2k
views
Custom Loop and Infinite Scroll
I am using customized version of _s theme where I have Product CPT.
In the following files, I need to use Infinite scroll (provided by Jetpack) -
archive-products.php
taxonomy-[tax-name].php
...
4
votes
1
answer
274
views
Add control in image detail panel
I am trying to add a checkbox control in the image details popup (when editing image in a post). I have added the following code in my template function.php but I can't manage to display the checkbox ...
4
votes
3
answers
2k
views
Static raw HTML page
On the server there is a static HTML page example.html in my root folder of the WordPress install. Now when a user types www.example.com/example.html I want WordPress to be smart and bypass all normal ...
4
votes
0
answers
2k
views
Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
I've never posted here, but I'm tired of slapping code together. That said, I would be most appreciative if someone could help me with this.
I need a page template that:
outputs the PARENT PAGEs,
...
4
votes
1
answer
2k
views
Split content into multiple columns using more tag?
First of, this is pretty much an exact duplicate of:
Split columns into three+ divs?
But the given solution does not work (returns blank). I'm guessing it collides with qTranslate which adds some ...
3
votes
0
answers
572
views
Solve cors problem using rest api or ajax
I'm building an app with nuxt using WP as a CMS, so I have this code in my functions.php to allow any origin (temporary) using the rest api and admin-ajax urls
function add_cors_http_header(){
// ...
3
votes
1
answer
1k
views
How to delete all posts from a custom post type?
I want to delete all posts from a custom post type "TV-Serie". The number of all posts in this post type are 150,000.
Moreover, when I try to delete them all manually while selecting more than 500 ...