Skip to main content

Unanswered Questions

2,560 questions with no upvoted or accepted answers
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
130 views

Prevent posts from being published if the 'Uncategorized'-category or no category is selected

I do not want a user to be able to publish a post if no category is selected. This exact solution from a similar question is exactly what i want to do: jQuery(document).ready(function ($) { // ...
2 votes
0 answers
597 views

Wordpress Gutenberg: Attribute overwritten by block duplicate

For a custom wordpress gutenberg block I've created a list of buttons so that users can add/remove as many as needed. While this works pretty fine one issue occurs: When duplicating a block the ...
2 votes
1 answer
176 views

Using a function to change favorites listing

Sorry - total newbie here with Wordpress development. I have the following plugin installed https://favoriteposts.com/ and it allows you to change the default output of the users favorites by using ...
2 votes
0 answers
608 views

Get Required Assets (JS, CSS etc) for post using REST API

I'm using the REST API to access WordPress data and publish it on a custom frontend as part of an integration. This works great because the shortcodes are parsed and rendered by WordPress so the ...
2 votes
0 answers
292 views

Passing RichText attributes to function onChange

I have four RichText elements in a custom Gutenberg block I am developing, and they are all very similar except for the "name" attribute, which is currently hard-coded. What I need to do is ...
2 votes
0 answers
172 views

How to debug error message: Cannot modify header information

I'm experiencing some wierdness with a custom theme in WooCommerce. I know that WooCommerce is off-topic, but while debugging it, I've figured out that it most likely is another plugin, that is the ...
2 votes
0 answers
84 views

Disable shortlinks like ?p=1234 to prevent scraping

I have a site with several thousand public pages that use randomly generated slugs for their pretty urls. The content is public in the sense that if someone knows the URL, they can see the content. I'...
2 votes
0 answers
346 views

Including dependencies using @wordpress/dependency-extraction-webpack-plugin

I would like to add include additional script handles to the dependencies in assets.php using @wordpress/dependency-extraction-webpack-plugin. An example for this would be a script that extends ...
2 votes
0 answers
779 views

Nonces, AJAX, script variables & security in WordPress

Alright, so let's say you develop a website where you enqueue a js script on a page X of your frontend, using: wp_enqueue_script( 'script_handle', PATH_TO_SCRIPT, array(), '1.0.0', true ); ...
2 votes
0 answers
266 views

Override Plugin Script Fucnction in Wordpress

I don't know how to remove a specific function from a plugin. My plugin is Photo-gallery. I want to remove this function: function spider_createpopup(url, current_view, width, height, duration, ...
2 votes
1 answer
696 views

Custom roles can't access to wp-admin

i'm trying to create a custom role, very similar to admin but without the capabilities to edit/delete plugins. Since i don't wont to use plugin for that i've edited the functions.php file adding ...
2 votes
1 answer
2k views

Uncaught TypeError: Cannot read property 'firstChild' of null after upgrading to WordPress 5.5

I am getting the following error from comment-reply.min.js (which seems to be a WordPress file): Uncaught TypeError: Cannot read property 'firstChild' of null at comment-reply.min.js?ver=...
2 votes
0 answers
871 views

What is the correct way to import the blocks-editor?

I was following a blocks tutorial that was using @wordpress/editor to import some components and everything was working correctly but I was getting tons of deprecation warnings in the browser all ...
2 votes
0 answers
180 views

Redirect a list of URLs to another URL, using functions.php

What I wish to do I have a number of Wordpress URLs I need to redirect, along with a 301 permanent redirect header being sent to browser. The URLs to redirect are: https://www.mydomain.com.au/...

15 30 50 per page
1
3 4
5
6 7
171