Unanswered Questions
2,817 questions with no upvoted or accepted answers
8
votes
1
answer
666
views
static variable loop not working in Wordpress
I have a function in my wordpress theme that deletes the first embedded video in a video post. See code below. This is in the functions.php file.
/* - function that hides first video in post content -...
7
votes
2
answers
9k
views
why is translation not working on theme?
Background
I am using the theme Rookie from Sportpress.
I created a child theme.
Translation files are existing, especially german in my case.
Wordpress is set to german language.
The Problem
...
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 ...
6
votes
0
answers
248
views
Customize WordPress Media Manager - Media Window
Im trying to customize the wordpress media manager "add media" window to get it as simple as possible to use. So i want to disable/ hide the following fields/ functions because i dont need some or ...
5
votes
1
answer
75
views
How to move the customizations done in the Editor to my child theme?
Dashboard -> Appearance -> Editor -> 3-dots menu -> Export lets one download a zip file, which contains the folders parts and templates that - according to various online tutorials - ...
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
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
4
answers
334
views
What is the Difference between directly call a function and call a function using add_action?
What is the difference between following two codes? (Directly call a function and call a function using add_action)
function pp_submit__link_form(){
if(isset( $_POST['action']) && $...
4
votes
1
answer
827
views
How to use parent theme's enqueue methods
According to the codex, when creating a child theme, you have to manually enqueue the parent theme's scripts.
My parent theme has logic to conditionally display various css files, cached css, and ...
4
votes
0
answers
91
views
my function doesn't return my post from today
I'm using gravity form to create some custom post type - as events.
Everything is working great, There is some date field to setup the event from x to y date. ALl of this working great.
However, I ...
4
votes
2
answers
3k
views
How do I override a parent theme's language files with a child theme?
I have a parent theme and a child theme, I would like to override the spanish .mo and .po files in the parent theme (or add them if they are not present in the parent theme) with the es_ES ones in my ...
3
votes
3
answers
116
views
Is it possible to automatically set the publication time to 8am on new posts?
This might be kind of funky to pull off, but does anyone have any ideas on how I could automatically set the time to 8am on any newly created post drafts? In both the Classic Editor and the Block ...
3
votes
0
answers
82
views
Can I customize any WordPress parent block-based theme template files by child theme like a parent classic theme?
Usually, I can replace the template files and PHP codes of any parent classic theme with child themes. Since block-based theme templates rely on HTML, how can I replace parent block-based theme files ...
3
votes
0
answers
2k
views
Changing order title and featured image in blog post (Astra theme)
The HTML of a post type, I want to swap the position of the title and the thumbnail. I noticed that the title and thumbnail are inside a <header> tag. So I went looking which template file has ...