All Questions
35,523
questions with no upvoted or accepted answers
17
votes
0
answers
2k
views
How to filter or remove default panels in Gutenberg PrePublish Panel
I would like to edit the text or remove and re-create the Publish panel of Gutenberg's PrePublish Panel in the editor sidebar.
I know I can use wp.data.dispatch( 'core/edit-post' ).removeEditorPanel( ...
13
votes
1
answer
961
views
web.config conflict on IIS
folder structure
docroot
|- wordpress
|- web.config
|- wp-content
|- japi
|- index.php
\- web.config
...
...
As you can see there are 2 web.config s....
12
votes
0
answers
332
views
Custom collection in media manager?
I'm working on a plugin that extends the media manager, load JSON based input data to render an own collection of images and may upload them to my wordpress media library.
So far I got my own tab, ...
11
votes
0
answers
385
views
Hook in wp.media to add a new tab
This is an issue coming up while creating a plugin. I want to add a tab to the wp.media.view.MediaFrame.Select modal or if a general approach helps:
In the customizer I want to hook in any modal ...
10
votes
1
answer
908
views
Custom Taxonomy Endpoint Pagination using paginate_links()
The Setup
I have 2 taxonomies and 1 post type:
Post Type: products
Hierarchical Taxonomy: product_cat
Nonhierarchical Taxonomy: product_type
The product-category has a defined endpoint:
...
9
votes
1
answer
1k
views
How to make a script load after Custom Block is loaded in the editor?
I'm trying to make a Custom Gutenberg Block, but I'm having trouble with loading javascript that goes with this block.
On the front-end it works fine, but in the editor it seems that the script ...
8
votes
2
answers
1k
views
Pass media upload value to input field
I have created a meta-box that provides a upload function via the default media uploader from WordPress.
This works fine as long as I have one upload option.
But guess what? I want another one.
If I ...
8
votes
1
answer
633
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 -...
8
votes
3
answers
4k
views
Use subdomain for certain urls
I have the following rules in my .htaccess file on a WordPress (single installation):
# REWRITE FORUMS DOMAIN TO FOLDER
RewriteCond %{HTTP_HOST} ^forums\.example\.com$
RewriteRule !^forums/? forums%{...
8
votes
3
answers
4k
views
Multisite Domain Mapping with SSL
I've done some searching but couldn't find this issue elsewhere, apologies if this has already been discussed elsewhere.
I've set up a Multisite install; and am trying to set up domain mapping for ...
7
votes
2
answers
944
views
Implementing Gutenberg RichText onSplit / onReplace
I need an unordered list, but with options selected for each list item. To achieve this I've created a custom block called icon-list which is a ul element with InnerBlocks, which allows only my custom ...
7
votes
0
answers
2k
views
How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table <td> elements?
I'm trying to allow users to paste (relatively) simple tables into Gutenberg. The editor converts the raw HTML fine but strips out any attributes/classes. For the most part this is good - I want to ...
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 ...
7
votes
0
answers
2k
views
add_rewrite_endpoint() not working for custom post type archives
i'm working on somekind of wiki/encyclopedia system based on wordpress.
there are two custom post types. i'll show my configuration for one of them:
$labels = array(
'name' => _x('Objects', '...
7
votes
2
answers
8k
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
...
7
votes
2
answers
4k
views
Change label of title field for posts in the backend
I am trying to add some HTML to the title label in the backend of WordPress.
Attempt 1:
I am using the following (simplified) function:
function change_post_titles() {
global $post, $title, $...
6
votes
0
answers
2k
views
How to trigger JS in gutenberg page load
I've loaded a jQuery script with enqueue_block_editor_assets for gutenberg and wp_print_scripts for frontend which is loaded fine.
add_action( 'wp_print_scripts', 'sk_load_script' );
add_action( '...
6
votes
0
answers
992
views
Add additional classes to gutenberg .editor-styles-wrapper
I'm working with tailwind and I was wondering how you would add a class to the div that has .editor-styles-wrapper applied to it so it would be .editor-styles-wrapper .my-custom-class
Is there a ...
6
votes
0
answers
459
views
Gutenberg Blocks doesn't render correctly when using do_blocks
I'm trying to render a post_content with blocks using the do_blocks function, that takes a gutenberg content, parses every block, and returns an HTML string.
The problem is that some blocks aren't ...
6
votes
1
answer
1k
views
Wordpress admin notice in plugin function
i have sample wordpress plugin class. Im hooking woocommerce woocommerce_saved_order_items and i want create a admin notice. Add action from __construct works, but when i want create a notice in hook ...
6
votes
0
answers
604
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
1
answer
2k
views
Add category to custom post URL
I am trying to create custom post with custom taxonomy and categories. Structure is like:
Product:
Has categories
Has taxonomy
Custom post type create:
function create_alco_custom_post() {
$...
6
votes
2
answers
4k
views
Remove index.php in permalink structure on IIS server
In permalinks(dashboard) section index.php added.
e.g.
Current Post Name: http://zakatchicago.com/index.php/sample-post/
Expected Post Name: http://zakatchicago.com/sample-post/
How can i remove ...
6
votes
1
answer
428
views
RequireJS in custom theme. Working Example
I try to add to my custom wordpress Theme requirejs because I do not want to use wp_enqueue over and over to inject used plugins and on the other side I do not want to mess the DOM from the beginning.
...
6
votes
3
answers
1k
views
Using MAMP and Xip.io to view a WordPress Multisite on a local network
I am trying to use MAMP's built in Xip.io functionality to view a WordPress multisite installation on a local network. I have this working no problem with a WordPress single installation but am ...
6
votes
2
answers
2k
views
Give to site admin the option to "skip confirmation email" when adding new user
in wordpress multisite when we give to site admin the option to add new users, site admin dont have the "checkbox" to add the new user without sending the user email with link activation (see the ...
6
votes
1
answer
1k
views
How do I display two separate taxonomy archives for two post types that share a single taxonomy?
I have a custom content type, "products", which shares the category taxonomy with posts. We're using posts to discuss and review products. The idea is to have two separate URLs:
/discussion/...
6
votes
1
answer
1k
views
Post and Page Inheritance to subsites in a WordPress Network
I have to develop a multi-country, multi-lingual website. One country may have multiple languages. I have setup a WordPress Network and created subsites for each country like following.
abc.com/ > ...
6
votes
1
answer
202
views
WP Multisite - multilanguage - swich to other language by click, but "same" content
I want to run a WP-multisite for 4 languages (in development), and did it so, 4 blogs, each one got the same content but in a different language, same structure, same pages, same postings, same images....
6
votes
1
answer
648
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 ...
6
votes
1
answer
2k
views
Admin Area Custom Type Search By Meta Fields Without Title & Content
I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code:
...
6
votes
1
answer
384
views
How can I safely increase the character limit for post passwords?
When I want to protect a post on one of my blogs, I like to use a passphrase instead of a password (albeit purely for the sake of creativity, not security — they're stored plainly anyway). However, ...
6
votes
2
answers
5k
views
Remove email verification when new user register
Please note I'm not posting this question without doing google search, but the problem is every single result I found is either about BuddyPress or WP Multisite, but I have a WP Single installation ...
5
votes
0
answers
61
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
1k
views
Adding a custom PanelColorSettings control to a core block, and using the color slug in a custom className
I'm trying to add a custom color control to the group and cover blocks, and if a color is selected, construct a custom className for the block. This custom class is used for a section separator.
What ...
5
votes
1
answer
1k
views
Once Again: How to Remove Option from Gutenberg Editor for Specific Block in theme.json
Since WP 5.8 we can define various settings in the theme.json which is much appreciated and really helpful. But there are still some options I cannot find, e.g. how can I remove the layout panel from ...
5
votes
0
answers
483
views
How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
If I want to extend the core block I can use Block Filters where I found a filter like editor.BlockEdit.
Example from doc:
const { createHigherOrderComponent } = wp.compose;
const { Fragment } = wp....
5
votes
0
answers
484
views
How to support Lazy Loading Assets in a WordPress Theme?
I'm using the create-block module provided in Gutenberg Core to build my custom blocks within a plugin. It works great, but I'm struggling to figure out how to conditionally load the assets on the ...
5
votes
0
answers
697
views
Is there a core Sortable component in Gutenberg?
I managed to somewhat replicate the product gallery metabox from WooCommerce in Gutenberg using the
third-party react-sortable-hoc component. As it seems that this component is no longer supported, I'...
5
votes
0
answers
967
views
WordPress REST API call generates nonce twice on every call
I'm trying to login a user via the REST API, and then retrieve the current user on subsequent requests. As per the documentation, in my plugin, I am creating and retrieving a nonce after a successful ...
5
votes
0
answers
881
views
Exporting revisions
How do you export revisions for posts?
I cloned a site with it's complete Wordpress DB 4 months ago.
After the clone revisions have been made to the existing posts and new posts has been added to ...
5
votes
1
answer
3k
views
WP REST API returns blank response if post is too long
I'm working on an iOS app that requires the use of WP Rest API to fetch posts. Everything is working smoothly and I fetch posts by ID using this endpoint:
https://example.com/wp-json/wp/v2/posts/...
5
votes
1
answer
2k
views
Find out what is using PHP sessions in WordPress
Is there a way to find out what is using PHP sessions or spawning PHP processes?
My Wordpress site gets heavy traffic (3.5 million hits per month). We discovered recently that we had permissions set ...
5
votes
0
answers
428
views
HTML5 theme support for comments + form 'novalidate' - how to handle it properly?
INTRODUCTION
My research is based on following assumptions:
WordPress version supports HTML5
Go to any admin page and inspect the resulting document. It should start with <!DOCTYPE html>.
...
5
votes
1
answer
960
views
WP_Site_Query vs. WP_Network_Query in WordPress 4.6
Can someone explain the difference between WP_Site_Query and WP_Network_Query in WordPress 4.6?
WP_Network_Query() : Core class used for querying networks.
WP_Site_Query() : Core class used for ...
5
votes
1
answer
649
views
WP-CLI methods for get_current_blog_id, get_blog_details or $wpdb->prefix
I'm looking for some extra information about an mu site (--url) when attempting to export from a remote server to my local testing environment.
One requirement for migration is the existing blog_id ...
5
votes
0
answers
2k
views
How to allow users login to WP from external domain and make REST requests
Basically what i want to do is:
Use Wordpress as a login system and data storage for web-application on another domain.
Make users able to register and perform REST calls from the application.
Let ...
5
votes
1
answer
531
views
Disable plugins on cron and ajax page
I want to disable few wordpress plugins on my cron and an ajax page. I have already tried option_active_plugins filter but it's not working. I have checked and found most of the people say that ...
5
votes
1
answer
2k
views
WSOD but WP_DEBUG not giving any errors
I am running Wordpress on a WAMP stack and I'm trying to debug a WSOD error, which I think is a PHP error, as I have tried disabling all my plugins and themes and they don't seem to be the problem.
I'...
5
votes
1
answer
1k
views
Order wp_query by calculated field
Hi I'm working on a store locator.
I have a custom post "clinics" where I save clinic details (address,.., lat, lng). Each time I publish a new clinic I save post_id, lat and lng also in a custom ...