Unanswered Questions
2,244 questions with no answers
3
votes
0
answers
1k
views
CPU usage: AJAX and Heartbeat API on admin pages
My (shared) web host recently sent me this:
"Our server monitoring systems keep indicating high server load persistently maintained by your website (...). Most of the hits are to the /www/www/wp-...
3
votes
0
answers
2k
views
Getting Post Thumbnail from RSS feed with SimplePie
I am trying to pull the post thumbnail from an RSS feed to output on an external site. I am using the following function to add the post thumbnail to the site:
function rss_post_thumbnail($content) {
...
3
votes
0
answers
2k
views
Unique key for each row in a repeater field
Is it possible to have a unique key for each sub fields in a repeater field? I don't want to use the array index, because the array index can be changed, when adding new rows between existing rows.
I ...
2
votes
0
answers
63
views
Can't find elemnts on the DOM using Custom Control in Customizer API
I'am creating a Custom Control on Customizer API, I add Multiple Checkbox as my custom type.
When I wanna add a live preview, the jQuery doesn't find the selector that I want.
Here's functions.php ...
2
votes
0
answers
25
views
How do I stylize selected comments?
I built my own theme from scratch, which has worked well for years, but I'm very rusty now on how I did it, and I could do with some help with my re-learning process.
When certain people comment (and ...
2
votes
0
answers
206
views
AJAX returning blank result
I'm using ajax to filter a list. The filter works as it should most of the time, but for some queries it returns a blank result. When this happens, the error in the console is:
PHP Errors in Ajax ...
2
votes
0
answers
66
views
Creating a table via dbDelta
I'm trying to figure out exactly how to create table structures in databases correctly, and after doing my research I'm left with a couple of questions that I can't find an answer to:
In MySQL, there ...
2
votes
0
answers
627
views
Problems with wordpress nonces in Ajax call
i am having big troubles with Wordpress nonces in ajax call. Basically i am trying to trigger a custom standalone php script i made on my custom theme that send emails to admins people whenever ...
2
votes
0
answers
83
views
Hide categories that are not used in the post type
I have a situation where I need to display categories on the Archive Page of CPTs, but if the category is not used anywhere in the CPT, it needs to be excluded from the list.
For example, I have a CPT ...
2
votes
0
answers
19
views
Is there CSS to expand the gallery limit on Index Pages?
On a wordpress index page, I am only allowed to add 12 galleries. I would like to add many more. Is there a way that I can expand the gallery limit allowed on index pages?
If this is not possible, is ...
2
votes
0
answers
1k
views
AJAX function running TWICE with WordPress admin-ajax.php
I have a form submit event that calls a WordPress ajax function. The form submit event occurs only once (It is correct as expected). But the ajax function loaded TWICE (expected to occur once).
Here ...
2
votes
0
answers
1k
views
Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
I have a code I always used in my themes or child-themes.
I'm doing right now a project with plugin-only as a solution, so I tried to copy paste some stuff from child-theme to plugin file, but I get ...
2
votes
0
answers
23
views
Newbie question: no index.php? in my plain wordpress permalink
I am trying to learn about the Rewrite API and I see people write their plain permalink as "index.php?page_id=", but my local Wordpress site shows "?page_id=" instead. Is there any ...
2
votes
0
answers
905
views
WooCommerce event works in jQuery but not in JavaScript
I'm using WooCommerce hook added_to_cart which works perfectly in jQuery, but doesn't work in vanilla Javascript. Both functions are running on document loaded. Here is my code reference:
JavaScript
...
2
votes
0
answers
182
views
Change title and meta description in included page (not template)
I'm trying to change title and meta description for pages used for products.
The goal is to have the same effect as here:
<script>document.title = "<?php echo $new_title; ?>";<...