All Questions

35,736 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
19 votes
1 answer
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( ...
spnzr's user avatar
  • 241
13 votes
0 answers
352 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, ...
Sacer's user avatar
  • 131
11 votes
0 answers
410 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 ...
LeMike's user avatar
  • 388
10 votes
1 answer
952 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: ...
Howdy_McGee's user avatar
  • 20.7k
8 votes
3 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 ...
Interactive's user avatar
8 votes
1 answer
655 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 -...
danny471's user avatar
  • 191
8 votes
4 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%{...
Cameron's user avatar
  • 339
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 ...
James Morrison's user avatar
7 votes
2 answers
1k 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 ...
gregdev's user avatar
  • 191
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 ...
Tommy Ferry's user avatar
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 ...
Josh Mountain's user avatar
7 votes
0 answers
3k 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', '...
hans's user avatar
  • 77
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 ...
André Kelling's user avatar
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( '...
micky's user avatar
  • 113
6 votes
0 answers
1k 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 ...
Astrid's user avatar
  • 123
6 votes
0 answers
492 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 ...
Raba's user avatar
  • 406
6 votes
0 answers
1k 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 ...
kvnam's user avatar
  • 111
6 votes
0 answers
624 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 ...
Gadzhev's user avatar
  • 181
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() { $...
KWA's user avatar
  • 61
6 votes
0 answers
665 views

Prevent 404 when using pre_get_posts to filter an archive page

I have added a custom taxonomy named "area" to the default "post" post type. It's meant to organize posts by geographical area. In category pages I've added a dropdown that allows the user to filter ...
Andreyu's user avatar
  • 253
6 votes
0 answers
246 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 ...
public9nf's user avatar
  • 386
6 votes
1 answer
439 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. ...
fefe's user avatar
  • 874
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 ...
Duncan Morley's user avatar
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 ...
need-help's user avatar
  • 466
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/...
Marc's user avatar
  • 61
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/ > ...
M-R's user avatar
  • 2,606
6 votes
1 answer
205 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....
Orwell's user avatar
  • 71
6 votes
2 answers
657 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 ...
javy's user avatar
  • 456
6 votes
2 answers
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: ...
user1117841's user avatar
6 votes
1 answer
390 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, ...
BoltClock's user avatar
  • 161
6 votes
2 answers
679 views

Let readers suggest edits from the frontend

I'd like to make my articles editable at the front-end for any reader who visits the site. (More like a wiki). I don't really want to trouble them through the registration process. I have no idea how ...
Ken's user avatar
  • 163
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 ...
iSaumya's user avatar
  • 934
5 votes
0 answers
70 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 - ...
anick's user avatar
  • 151
5 votes
0 answers
743 views

Is doing_wp_cron a necessary query string when scheduling cron.php as a cron job?

I have seen various ways to schedule the WordPress cron so that it is triggered by the server. Some will run the php file directory from the crontab and others will use a wget and reference the url. I ...
Mark Hunter's user avatar
5 votes
1 answer
2k 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 ...
Michael Bourne's user avatar
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 ...
uruk's user avatar
  • 529
5 votes
0 answers
562 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....
kanlukasz's user avatar
  • 504
5 votes
0 answers
543 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 ...
Thad's user avatar
  • 105
5 votes
0 answers
186 views

Does WordPress only support HTTP 1.1?

I'm not sure if this is a bug or if I'm missing anything. But according to the documentation for WP_Http::request(), you should be able to set the HTTP protocol version with the httpversion option. ...
devbanana's user avatar
  • 153
5 votes
0 answers
812 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'...
leemon's user avatar
  • 1,928
5 votes
0 answers
1k views

How to use getBlockIndex

I want to create a block with HowTo microdata markup and automatically assign ID to child blocks. I have created a holder as the parent block, and I want to give the first child block id="step1", ...
Winston's user avatar
  • 145
5 votes
0 answers
468 views

Is it possible to bulk migrate all deprecated instances of a gutenberg block?

I wrote a plugin which defines a gutenberg block. After using this block in posts, I've changed its definition inside my plugin, so now I have a "deprecated" entry in the block configuration ...
camcam's user avatar
  • 151
5 votes
0 answers
979 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 ...
lowkey's user avatar
  • 150
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/...
Null TX's user avatar
  • 321
5 votes
0 answers
581 views

Best way of removing emoji support from url / slug only

Couldn't find anything on the topic. I guess something could be done with the 'wp_unique_post_slug' filter but how would I go about just removing the emojis from the slug? I've tried all kinds of ...
jimihenrik's user avatar
5 votes
3 answers
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 ...
mayabelle's user avatar
  • 151
5 votes
0 answers
446 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>. ...
Frank P. Walentynowicz's user avatar
5 votes
1 answer
712 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 ...
jgraup's user avatar
  • 9,764
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 ...
Dariusz Sikorski's user avatar
5 votes
1 answer
609 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 ...
Humpty's user avatar
  • 51

15 30 50 per page
1
2 3 4 5
715