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

Hi, Welcome to

Wholesome Code

I.

Install WordPress Repository Plugins and Themes with Composer

February 21, 2021 11:19 pmFebruary 21, 2021By Matt WatsonIn Guides, WordPress0 Comments138 Views
{ "name": "wholesomecode/composer-example", "description": "Demonstration of how to use composer within WordPress", "require": { "wpackagist-plugin/wholesome-publishing":">=1.3.0" }, "repositories": [ { "type":"composer", "url":"https://wpackagist.org" } ] }

In my last guide I told you how to install your GitHub maintained WordPress themes and plugins with composer. Well what if I told you you could also use composer to install any Theme or Plugin from the WordPress repository?…

Read more

I.

Install WordPress Plugins and Themes from GitHub with Composer

February 18, 2021 10:46 pmFebruary 21, 2021By Matt WatsonIn Guides, WordPress0 Comments158 Views
{ "name": "wholesomecode/composer-example-theme", "description": "Demonstration of how to use composer within WordPress", "type": "wordpress-theme", "require": { "composer/installers": "~1.0" } }

In your client projects, do you keep installing the same theme or plugin that you have developed? Do you make a fix in one project that you really wish you could easily roll out to all the other projects? If…

Read more

u.

update_post_meta WordPress Block Editor (Gutenberg) Equivalent is editPost

February 10, 2021 8:54 pmFebruary 10, 2021By Matt WatsonIn Blog, WordPress0 Comments172 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 Comments123 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 Comments181 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 pmFebruary 11, 2021By Matt WatsonIn Blog, WordPress2 Comments522 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 Comments105 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 Comments108 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

U.

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

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

C.

Coping with Lockdown

March 17, 2020 10:15 pmFebruary 4, 2021By Matt WatsonIn Blog, Health0 Comments92 Views
Corona Virus

Virus PNG Designed By nickfz from Pngtree.com. On the morning that this blog post was published, my son presented himself with a temperature and a cough. Previously the UK Government had issued advice that if you have a temperature and…

Read more

Posts navigation

1 2 3 4 5 Next

Useful Links

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

Guides

  • Install WordPress Repository Plugins and Themes with Composer
  • Install WordPress Plugins and Themes from GitHub with Composer
  • Array Chunk

Latest Posts

  • I.
    Install WordPress Repository Plugins and Themes with Composer
  • I.
    Install WordPress Plugins and Themes from GitHub with Composer
  • u.
    update_post_meta WordPress Block Editor (Gutenberg) Equivalent is editPost
  • w.
    wp_get_attachment_image WordPress Block Editor (Gutenberg) Equivalent is getMeta

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
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Cookie settingsACCEPT
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.

CookieDurationDescription
__cfduid1 monthThe cookie is used by cdn services like CloudFare to identify individual clients behind a shared IP address and apply security settings on a per-client basis. It does not correspond to any user ID in the web application and does not store any personally identifiable information.
__cfruidsessionThis cookie is set by the provider Cloudflare. This cookie is used for load balancing and for identifying trusted web traffic.
cookielawinfo-checbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-advertisement1 yearThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Advertisement".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.

Functional

Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.

CookieDurationDescription
__cf_bm29 minutesThis cookie is set by CloudFare. The cookie is used to support Cloudfare Bot Management.
_gh_sessThis cookie is used to preserve users states across page requests.

Performance

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

CookieDurationDescription
d3 monthsThis cookie tracks anonymous information on how visitors use the website.
YSCsessionThis cookies is set by Youtube and is used to track the views of embedded videos.

Analytics

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

CookieDurationDescription
__gads1 year 24 daysThis cookie is set by Google and stored under the name dounleclick.com. This cookie is used to track how many times users see a particular advert which helps in measuring the success of the campaign and calculate the revenue generated by the campaign. These cookies can only be read from the domain that it is set on so it will not track any data while browsing through another sites.
_ga2 yearsThis cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assign a randomly generated number to identify unique visitors.
_gid1 dayThis cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the wbsite is doing. The data collected including the number visitors, the source where they have come from, and the pages viisted in an anonymous form.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.

CookieDurationDescription
CMID1 yearThe cookie is set by CasaleMedia. The cookie is used to collect information about the usage behavior for targeted advertising.
CMPS3 monthsThis cookie is set by Casalemedia and is used for targeted advertisement purposes.
IDE1 year 24 daysUsed by Google DoubleClick and stores information about how the user uses the website and any other advertisement before visiting the website. This is used to present users with ads that are relevant to them according to the user profile.
KTPCACOOKIE1 dayThis cookie is set by pubmatic.com for the purpose of checking if third-party cookies are enabled on the user's website.
mc1 year 1 monthThis cookie is associated with Quantserve to track anonymously how a user interact with the website.
test_cookie15 minutesThis cookie is set by doubleclick.net. The purpose of the cookie is to determine if the user's browser supports cookies.
VISITOR_INFO1_LIVE5 months 27 daysThis cookie is set by Youtube. Used to track the information of the embedded YouTube videos on a website.

Others

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

Other

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

CookieDurationDescription
_gat_gtag_UA_160855759_11 minuteNo description
_octo1 yearNo description
cf_ob_infoNo description
cf_use_obNo description
codepen_session1 monthNo description
CONSENT16 years 10 months 10 days 10 hours 25 minutesNo description
gadsTestsessionNo description
i1 yearThe purpose of the cookie is not known yet.
logged_in1 yearNo description

SAVE & ACCEPT
Powered by