Skip to main content

Unanswered Questions

3,920 questions with no upvoted or accepted answers
8 votes
1 answer
667 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
1 answer
2k views

Registering menu with 'Automatically add new top-level pages to this menu' selected

Is it possible to register a menu inside of a theme functions file and have 'Automatically add new top-level pages to this menu' pre-selected? I can't find any info about this in the ...
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 ...
6 votes
2 answers
661 views

Link to Author archive from Navigation Menus in dashboard?

I'd like to display a grid of authors on my site showing the name of the author and their avatar. The tricky part is, I'd like to be able to control this from the Menus page in the dashboard so I have ...
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
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
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
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
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
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
3 answers
117 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
1 answer
104 views

Changing a function in function.php to a shortcode - for listing categories of only a certain post type

I'm trying to create a shortcode that can display a list of categories. However, it should: First, limit the results to a specific post type (based on shortcode usage) then check to see if category ...

15 30 50 per page
1
2 3 4 5
262