Skip to main content

Questions tagged [react]

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Are there any option or hack to show initial cart content without reactjs? I mean the products and total sum blocks, no need to be full page. Those elements are generated after page load, which is ...
Doraemon's user avatar
  • 219
0 votes
0 answers
24 views

Need a little help to solve the behavior issue. I’ve developed two custom Gutenberg blocks — a parent block and a child block. When a user clicks a paragraph block inside the custom child block and ...
dvaansiseelr's user avatar
0 votes
0 answers
23 views

I want a sidebar panel in the post editor where a user can pick an assignee and an editor for a post. The post will be populated by a list of every user on the site. When the page loads, I want the ...
user18102663's user avatar
2 votes
1 answer
94 views

I'm building a block that shows an infinite list of posts using the Interactivity API: render.php <?php $block_attributes = get_block_wrapper_attributes() ?> <div <?php echo $...
leemon's user avatar
  • 2,048
2 votes
0 answers
47 views

I'm using React WP dataviews component in my plugin, but I can't load translation for the component. OFFICIAL DOCS I loaded plugin translation into php file with: function umc_load_textdomain() { ...
Stefano's user avatar
  • 63
0 votes
0 answers
55 views

I have followed a couple of tutorials online in the pursuit of adding a react component to my WP page. I have gone over and over it for errors and I cant see what I must be missing, as the console ...
Craig Watson's user avatar
1 vote
0 answers
84 views

I'm trying to hook into wp_handle_upload_prefilter with JavaScript, but I must be doing it wrong. Here's my code: add_action( 'admin_enqueue_scripts', 'enqueue_backend_scripts', ); public ...
Johan Martin Aarstein's user avatar
0 votes
2 answers
221 views

Im creating a block plugin in worpress and each time I update my JS files, changes do not reflect to frontend because there's a browser cache. I found some strategies in others frameworks that rename ...
Filipe Petter's user avatar
0 votes
0 answers
69 views

I have a Context.Provider with a value setup in slider/edit.js. When I import it in the child component slide/edit.js with useContext it returns undefined I don't see what I'm missing here For context ...
Grzes Slania's user avatar
1 vote
0 answers
122 views

Hey folks So Im pretty new to this react + php in wordpress and I found one article where it showed how to extend a core block, which works fine for group and some basic block but When i tried to ...
DevopsRedefined's user avatar
1 vote
1 answer
313 views

I've built the following Gutenberg block. It's a carousel of images: /** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; import { G, Path, SVG, ToolbarGroup, ...
leemon's user avatar
  • 2,048
2 votes
1 answer
409 views

I am building static block slider (Swiper JS). Used wordpress/create-block https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/. Besides importing the JS & ...
Ion T's user avatar
  • 45
1 vote
1 answer
251 views

i have create a component that will update the viewport "Mobile, Tablet, Desktop" above. Of course, the user could also change the viewport on the top, but than my settings not synchron to ...
Sam Weiss-Gamtschi's user avatar
0 votes
1 answer
553 views

Since WooCommerce merged blocks in the plugin, the cart is now completely 'reactified'. Meaning I update the quantity on my cart, I see a network call to an endpoint, thigs update without reloading, ...
dingo_d's user avatar
  • 1,970
1 vote
1 answer
215 views

I am trying to nest a core columns within a core/columns /core/column template. I keep getting an error that block can't render. However looking at my code it looks fine. [I've simplified the code] So,...
Dave B's user avatar
  • 25
2 votes
1 answer
1k views

I have a plugin that registers four different Gutenberg blocks. I build them using the build script from the wp-scripts package. As you all surely know, this script automatically generates an index....
leemon's user avatar
  • 2,048
1 vote
0 answers
139 views

I am making an override to core/image block -disabling styles, changing markup and such. I have managed to solve some things, but struggle with some others. Here is my code: filters.php <?php use ...
Sam Tyurenkov's user avatar
1 vote
0 answers
158 views

I made a plugin that contains 2 custom gutenberg blocks created with react and jQuery (for some front-end stuff) and I'm having troubles translating them. There are no translation strings inside the ...
tsvetko.krastev's user avatar
2 votes
1 answer
376 views

I regularly use @wordpress/scripts for building both blocks and non-block components. Recently, I started working in a new plugin that registers both some blocks and non-block components that add ...
leemon's user avatar
  • 2,048
0 votes
0 answers
284 views

I'm using the following code to retrieve a list of post of a custom post type named movie: const { posts, hasPostsResolved } = useSelect(select => { const query = { order: 'desc', ...
leemon's user avatar
  • 2,048
0 votes
0 answers
235 views

I'm building a WordPress block in React, and I need the title and featured image to be displayed in the block. So I need a way to get the title value and the featured img URL in real time, so it ...
Michael's user avatar
0 votes
1 answer
395 views

Here's a second question in my quest to understand the Gutenberg Document Settings Panel sidebar and customize it. (See my first question here.) I have the following jsx code working for the edit ...
Andrew's user avatar
  • 209
0 votes
1 answer
493 views

I'm building a custom Masonry (non-jQuery version) gallery block and I managed to make it work in the block editor. I'm using WP 6.3. This is roughly the code: JS: const containerRef = useRef(null); ...
leemon's user avatar
  • 2,048
0 votes
2 answers
669 views

I'm working on a custom Gutenberg block that uses the Mapbox GL JS API for displaying a map. To create the map I have to call the following constructor. const map = new mapboxgl.Map({ container: '...
Emiel Zuurbier's user avatar
0 votes
0 answers
42 views

Need to use the WordPress Header Section in react js. No plugin is used for plugin it is by default.
Anand Kumar's user avatar