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

WordPress

Wholesome Code > WordPress
w.

wp_get_attachment_image WordPress Block Editor (Gutenberg) Equivalent is getMeta

February 9, 2021 9:56 pmFebruary 10, 2021By Matt WatsonIn Blog, WordPress0 Comments138 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 Comments209 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 Comments599 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 Comments115 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

W.

Wholesome Publishing – Comments and Draft blocks in WordPress

August 6, 2020 2:24 pmFebruary 8, 2021By Matt WatsonIn Plugins, WordPress0 Comments123 Views

Looking for Google Docs style comments? Try the plugin from Multdots instead. Wholesome Publishing brings some wholesome editing features to the WordPress Block Editor (Gutenberg). Features include: Ability to add threaded comments to individual blocks. Ability to mark a block…

Read more

D.

Debugging WordPress

June 18, 2020 10:07 amMarch 4, 2021By Matt WatsonIn Blog, Systems, WordPress0 Comments14 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 Comments11 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 the WordPress Block Editor (Gutenberg) with the REST API

May 6, 2020 11:54 amFebruary 10, 2021By Matt WatsonIn Blog, WordPress0 Comments608 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

@.

@wordpress/create-block bug hunt

February 26, 2020 12:05 pmFebruary 4, 2021By Matt WatsonIn Blog, WordPress0 Comments132 Views

Today I was writing my @wordpress/create-block series over on Wholesome Code, and during a demo I was filming relating to this, I wanted to use both a Mac and a PC to to run the script to show how easy…

Read more

A.

Additional Configuration for webpack

February 23, 2020 2:41 pmMarch 3, 2021By Matt WatsonIn Blog, WordPress0 Comments202 Views
Cubic Blocks

This article builds on top of the webpack.config.js file we created in the article Extending the WordPress Create Block Script webpack Config. If you have not read that article, you may want to give it a quick read. Supporting CSS…

Read more

Posts navigation

Previous 1 2 3 4 5 Next

Useful Links

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

Guides

  • Create Custom Meta Boxes Using the WordPress Block Editor (Gutenberg)
  • Using Post Meta Fields to Store Attributes in the WordPress Block Editor (Gutenberg)
  • Using PHP to Render a Block in the WordPress 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