Wholesome Code Wholesome Code
Wholesome Code Wholesome Code
  • Blog
  • Guides
  • Plugins
  • About
  • Contact

Blog

Wholesome Code > Blog
u.

update_post_meta WordPress Block Editor (Gutenberg) Equivalent is editPost

February 10, 2021 8:54 pmFebruary 10, 2021By Matt WatsonIn Blog, WordPress0 Comments189 Views
wp.data.dispatch( 'core/editor' ).editPost( { meta: { wholesomecode_meta_key_example: 'Example', }, } );

If you are wondering how to update_post_meta on the current post with Gutenberg, this is the article for you. You can just use editPost like so: The code above will update the post meta wholesomecode_meta_key_example with the value ‘Example’. Remember…

Read more

w.

wp_get_attachment_image WordPress Block Editor (Gutenberg) Equivalent is getMeta

February 9, 2021 9:56 pmFebruary 10, 2021By Matt WatsonIn Blog, WordPress0 Comments134 Views
wp.data.select( 'core' ).getMedia( 42 );

Looking for how to get the post thumbnail, or an attachment URL by its Id in WordPress gutenberg? You may have a returned post object by using the WordPress Gutenberg equivalent of WP_Query (or the WordPress Gutenberg equivalent of get_post)….

Read more

g.

get_post_meta WordPress Block Editor (Gutenberg) Equivalent is getEditedPostAttribute(‘meta’)

February 7, 2021 7:39 pmFebruary 10, 2021By Matt WatsonIn Blog, WordPress0 Comments204 Views
const meta = wp.data.select('core/editor').getEditedPostAttribute('meta');

If you are new to writing plugins for the WordPress Block Editor (Gutenberg), you may be searching around for how to get the meta of the current post with get_post_meta. Never fear, you can still get_post_meta, just use getEditedPostAttribute(‘meta’) on…

Read more

W.

WP_Query WordPress Block Editor (Gutenberg) Equivalent is getEntityRecords

February 5, 2021 11:54 pmMarch 3, 2021By Matt WatsonIn Blog, WordPress4 Comments582 Views
wp.data.select( 'core' ).getEntityRecords( 'postType', 'post', { 'status': 'draft', 'per_page': 2, } );

If you are new to writing plugins for the WordPress Block Editor (Gutenberg), you may be a little confused how to do all the things you did regularly, like grabbing posts with WP_Query. You will be very pleased to know…

Read more

g.

get_post WordPress Block Editor (Gutenberg) Equivalent is getEntityRecord

January 4, 2021 7:49 pmFebruary 10, 2021By Matt WatsonIn Blog, WordPress0 Comments114 Views
const post = wp.data.select('core').getEntityRecord('postType','post', 42);

New to writing plugins for the WordPress Block Editor (Gutenberg)? you may be searching around for how to do a get_post to get a post by ID. You can still get a post with get_post, just use getEntityRecord and pass…

Read more

A.

Agile Project Management – A Quick Overview

June 20, 2020 9:21 amMarch 4, 2021By Matt WatsonIn Blog, Systems0 Comments17 Views
Agile Sprint Cycle

This is a super quick reference guide to agile project management. In this guide we cover the following two approaches: Agile Sprint Cycle Agile Project Management with Kanban Agile Sprint Cycle Here is a diagram of how the Agile Sprint…

Read more

D.

Debugging WordPress

June 18, 2020 10:07 amMarch 4, 2021By Matt WatsonIn Blog, Systems, WordPress0 Comments7 Views
Debugging WordPress Diagram

You have just pushed out an update to your WordPress site, but somethings gone wrong. Perhaps you have got the dreaded White Screen of Death, or some error is being outputted on the screen. Here are the steps you need…

Read more

W.

Where to Store WordPress Settings?

June 15, 2020 9:43 amMarch 4, 2021By Matt WatsonIn Blog, Systems, WordPress0 Comments9 Views
Block Settings Diagram

Saving some data in WordPress, but not entirely sure where it should go? It is always good to have consistency when creating plugins, so I’ve made a handy little guide. Network Setting (Multisite wide settings) For settings that impact several…

Read more

U.

Using MoSCoW for Work Prioritisation

June 14, 2020 9:31 amMarch 4, 2021By Matt WatsonIn Blog, Systems0 Comments8 Views
MoSCow Diagram

MoSCoW is a great way to prioritise your tasks, and an essential part of any agile project managers toolkit. MoSCoW stands for: Must Have Should Have Could Have Won’t Have Here is what you do. Plot your tasks on a…

Read more

U.

Using the WordPress Block Editor (Gutenberg) with the REST API

May 6, 2020 11:54 amFebruary 10, 2021By Matt WatsonIn Blog, WordPress0 Comments592 Views
Library

In my previous article I talked about how to loop through posts and custom post types within Gutenberg. In this post I talk about receiving and using custom data within Gutenberg from WordPress REST API endpoints. In this example we…

Read more

Posts navigation

1 2 3 4 5 6 Next

Useful Links

  • About
  • Terms and Conditions
  • Privacy Policy
  • Cookie Policy
  • Contact

Guides

  • Using a Template with InnerBlocks in the WordPress Block Editor (Gutenberg)
  • Register a Block Template for the WordPress Block Editor (Gutenberg)
  • Register a Block Pattern in the WordPress Block Editor (Gutenberg)

Latest Posts

  • update_post_meta WordPress Block Editor (Gutenberg) Equivalent is editPost
  • wp_get_attachment_image WordPress Block Editor (Gutenberg) Equivalent is getMeta
  • get_post_meta WordPress Block Editor (Gutenberg) Equivalent is getEditedPostAttribute(‘meta’)
  • WP_Query WordPress Block Editor (Gutenberg) Equivalent is getEntityRecords

About

Wholesome Code: Crafting wonderfully wholesome things with WordPress.

Subscribe

© 2019 – 2021 Wholesome Code Ltd.
All rights reserved | Business No: 12196107

Menu
  • Blog
  • Guides
  • Plugins
  • About
  • Contact
Search