Unanswered Questions
2,608 questions with no answers
6
votes
0
answers
521
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
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 ...
5
votes
0
answers
883
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
1k
views
Remove left alignment option in core/image block
I’m trying this code to disable the left alignment option from the core/image block. I just want to make available the center and right alignment options.
wp.hooks.addFilter(
'blocks....
4
votes
0
answers
1k
views
Developing the save function in Gutenberg blocks
I am editing the save function on my local wordpress instance. Every time I make a change, I need to manually click the "Attempt Block Recovery" button to see the updated change when I go to ...
4
votes
0
answers
536
views
Custom Block - save.js function not saving attributes
I'm trying to get just a basic custom block displaying in the editor and saving. I've followed multiple tutorials and I keep getting the same result. No matter how simple my block is, whenever I add a ...
4
votes
0
answers
321
views
Provide specific example for block variation
I'm generating block variations on top of the "native" Gutenberg blocks (eg. core/***).
For example, I have a "catchphrase" block, which is a variation of the paragraph block (core/...
4
votes
0
answers
205
views
Hooking a callback into the code within a Gutenberg block
I want to run some JavaScript when a user uploads an image or images using the core/image block or core/gallery block. Ideally I would run my own code when the onSelectImage function is called (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 ...
3
votes
0
answers
110
views
What is "open()" in MediaUpload?
Googling (or searching here) on "open" is hard :)
The readme for MediaUpload gives this example:
<MediaUpload
onSelect={ ( media ) => console.log( 'selected ' + ...
3
votes
0
answers
2k
views
WordPress Ignoring .user.ini
I have a server using Apache and PHP-FPM. The server hosts several WordPress sites with each site running as a different user and using a different pool.
I'm trying to configure the post_max_size and ...
3
votes
0
answers
650
views
WASM page in Wordpress website
I used emscripten to generate some html/js/wasm/data files and would like to add that as a page to my (Wordpress) website. Is this possible? If so, how?
3
votes
0
answers
55
views
WordPress Rest API only returns content when posttype has editor capability
I am trying to request my post via the WordPress V2 Rest API in the backend. For whatever reason the post content is only returned when my custom post type has the editor support enabled. Is there a ...
3
votes
0
answers
386
views
WordPress Customizer Control with React
I am just doing a demo on the WordPress customizer API to edit the header with custom controls.
I have designed a custom control by extending WP_Customize_Control and Jquery to refresh/postMessage ...
3
votes
0
answers
118
views
How can I filter block registration based on post-type? (Block alignment settings)
I want to disable the .alignwide and .alignfull block alignment options (remove them from the editor UI) on the 'post' post-type only.
I have tried using this block registration filter to modify the '...