getEntityRecord without knowing the post type
In Gutenberg there’s the getEntityRecord selector that allows you to get the data of a post of a specific post type:
In Gutenberg there’s the getEntityRecord selector that allows you to get the data of a post of a specific post type:
In a plugin I’m building for Gutenberg, I register a meta field named _related_posts, which stores an array of post ids:
I created the function below that changes the permalink structure of posts in a specific category. Everything is working, but the button inside the post to edit the slug is gone.
I use the useSelect hook to retrieve data from the database when developing for the block editor.
I’m developing a Gutenberg block and I need to show a dropdown with all the terms of a custom taxonomy in it. I’m using the useSelect hook for retrieving this data, but it’s not working because it gets stuck showing the Loading... message and there are no errors in the console. I registered the taxonomy with the show_in_rest arg set to true.
Is there any hook or filter I can use programmatically to restrict posts displayed in the frontend archives and in the dashboard to posts only from specified author ID’s? We’ve been getting a lot of spam authors lately and I’ll like to also try this this approach while trying other means to get rid of spam.
I am trying to call wp_set_object_terms in a function hooked to custom post creation (via wp_insert_post_data) to set taxonomies tags for the post from a custom field:
I want to run the command : “composer install –prefer-dist” in a wordpress plugin in the hook register_activation_hook to install the require vendors. But when I trying to activating the plugin the error below is generate. Do you have a way to install the required composers when activate the plugin?
I would like to display my add to cart doem in a modal but doing so make a part of becomes missing.
I have variable products and the select field corresponding to the variation options is missing
Below is my code for a simple plugin settings page. It works and saves an option (“EN”, “CZ”).