Extend WordPress Gutenberg core/navigation-link
Extend WordPress Gutenberg core/navigation-link
Extend WordPress Gutenberg core/navigation-link
Rather than binding text with a directive, you could bind a callback with data-wp-watch that sets the inner HTML of the div when it runs: <div data-wp-watch=”callbacks.renderContent”></div> callbacks: { renderContent() { const context = getContext(); const element = getElement(); element.ref.innerHTML = context.randomPost.content.rendered; }, }, Since the callback uses context.randomPost.content.rendered, it should run any time that … Read more
Why Is wp.editor Not Adding the ”Add Media” Button When I Initialize It?
How to add new ACF repeater row after removing all rows using jQuery/Javascript
Keep the expansible tree (list of posts) open in the sidebar
Use a construct like this one: (function( $ ) { ‘use strict’; $( document ).ready( function() { // Put your code here }); })( jQuery );
I managed to find the solution myself. You need to modify the onUpdateStartDate() function: function onUpdateStartDate(value) { const date = new Date(value); date.setHours(0, 0, 0, 0); setMeta({ …meta, ‘_my_start_date’: date }); }
htaccess file prevents js scripts to run
You could do something like the following, this should go in your Child Theme’s functions.php or if not using a Child Theme then add to a custom plugin: function hide_permalink_metabox( $is_post_edit_page ) { if ( !current_user_can(‘update_core’) ) { // allows Admins to edit the permalink echo ‘<style> div#edit-slug-box {display:none!important;} </style>’; } You may need to … Read more
You should be able to pass the language across using wp_localize_script(). So you’re obviously enqueuing your own custom javascript file, lets say that file is called createlist.js. I assume you’re doing it like so: wp_enqueue_script( ‘createlist’, plugins_url( ‘createlist.js’, __DIR__ ), array( ‘jquery’ ), ‘1.0’, true ); (You’ll need to adjust the path for the JS … Read more