Developer Notes

  • Convert Divi Shortcodes to Blocks

    Convert Divi Shortcodes to Blocks

    I have created a plugin that converts the Divi shortcodes into blocks with a click of a button. I am using it internally for clients who wish to move away from Divi. Send me a note if you are wishing to convert your website into a WordPress Core Block Theme.

  • Recreate the Divi “Projects” Custom Post Type

    Recreate the Divi “Projects” Custom Post Type

    This will register the Projects CPT so it will be accessible after disabling the Divi theme.

  • Moving Away from the Divi Page Builder & Moving to the WordPress Block Editor

    Moving Away from the Divi Page Builder & Moving to the WordPress Block Editor

  • List blocks in editor

    List blocks used in the editor wp.data.select(‘core/block-editor’).getBlocks(); To get a list of all Blocks currently available in the editor wp.blocks.getBlockTypes()

  • Google Bard “wordmove forbid” Command

    The wordmove forbid instruction is a command that can be used to prevent Bard from using certain words or phrases. For example, if you ask Bard to “generate a poem about a cat,” Bard will generate a poem that contains the words “cat,” “meow,” “purr,” and “whiskers.” However, if you add the wordmove forbid instruction,…

  • Protected: Arete Website 2023

    There is no excerpt because this is a protected post.

  • How to Copy a Word Doc (or any Document) into a New WordPress Post

    How to Copy a Word Doc (or any Document) into a New WordPress Post

    Copy & Paste You may have a document that you wish to copy into a new WordPress blog post. Some common document formats include Microsoft Word documents (.docx), PDFs, Pages on Mac, Rich Text Format (.rtf), OpenDocument Text (.odt), etc.. To copy your document into a new WordPress post, follow these steps: Done. Now your…

  • How to Set the Featured Image of a Post

    How to Set the Featured Image of a Post

    WordPress has the ability to set a featured image for each post. The featured image represents the post and is typically displayed above the post content e.g. this post. Also the featured image is displayed in posts lists and on archive and search result pages. In this beginner’s guide, we’ll explain how to set the…

  • How to shrink Google font files for your website

    How to shrink Google font files for your website

    Are you concerned about slow loading times on your website because of Google fonts? Subset your fonts with google webfonts helper (mranftl.com). Download any Google font with only the specific characters for the language that your audience requires. Character options are: cyrillic, cyrillic-ext, hebrew, latin, latin-ext. If you audience is English speaking then latin will…

  • Reset WordPress database

    Reset WordPress database

    Sometimes while developing you may wish to completely reset your WordPress install. This will delete all the tables in your database and recreate them with the default WordPress schema. So make sure to back up any important data before executing this command. To reset your WordPress database using WP-CLI, simply open your CLI and navigate…

  • Design Inspiration

    Design Inspiration

    designspiration https://www.designspiration.com/ dribbble https://dribbble.com/ awwwards https://www.awwwards.com/

  • Core Post Author Block Linked to Author Page

    Make sure your WordPress post author block links to the author page with this easy code snippet! Learn how to add a link to the core post author block and dynamically wrap the content with a link to the author page.

  • WordPress FSE (Full Site Editing) Not working.

    All theme styles are broken Custom colors not showing from theme.json Custom colors from theme.json no longer showing when editing FSE template files.

  • WordPress FSE Fonts Stoped Loading

    Your WordPress website may appear broken. Fonts will not load from the theme.json file. Try reenabling Gutenberg and clearing you cache.

  • Manually Extract a Single Site from a WordPress Multisite using wp-cli

    It is rather simple to extract a stand-alone WordPress website from an existing multisite installation. The process here uses wp-cli. But one could achieve the same results using and db import/export tool such as phpmyadmin. Create new stand alone website First create the new stand alone wordpress website (not multisite) and run the wordpress installer.…

  • Scrape website with wget

    Mirror website All Files

  • Big Commerce Stencil

    Install https://developer.bigcommerce.com/stencil-docs/installing-stencil-cli/installing-stencil Don’t forget to switch to Node V12 in order to access stencil Setup theme Download theme and cd theme stencil init npm i stencil start

  • Svelte Snippets

    Remove protected comments from svelte build. Embed svelte bundle.js in html tag via php

  • WordPress Coding Standards in VS-Code

    Install Composer and php codesniffer Clone WPCS in a global utils directory e.g. C:\utils\Set phpcs config to wpcs Check to ensure WPCS is added Install VS Code extensions: phpcs and phpcbf.phpcs extension enables linting for all “PHP files in our editor.phpcbf will try to beautify and fix our code according to the chosen coding standard.…

  • NPM Tips

    List globally installed npm packages npm list -g –depth 0

  • Design Resources

    Search design resources Bitmap unsplash https://unsplash.com/ reshot https://www.reshot.com/ pexels https://www.pexels.com/ thenounproject https://thenounproject.com/ Vector undraw https://undraw.co/ vectorstock https://www.vectorstock.com/free-vectors Icons hero icons https://heroicons.dev/ icomoon https://icomoon.io/app/#/select relume https://icons.relume.io/ flaticon https://www.flaticon.com/

  • Allow Root from wp-cli 2.5

    export WP_CLI_ALLOW_ROOT=true

  • Domain Name Registrar Affiliates

    Name.com and Google Domains are my preferred domain name registrars. Purchase a domain at Name.com via this link and save $5.00 on your first purchase.

  • Affiliates

    Hosting Providers https://sunnymorgan.com/hosting-affiliates/ Domain Name Registrars https://sunnymorgan.com/domain-name-affiliates/ Plugins Crocoblock / Jetenginehttps://crocoblock.com/?ref=8946 Fluent CRM, Fluent Social, etc.https://wpmanageninja.com/?ref=1917 Smart Slider 3https://nextend.sjv.io/c/3612434/976563/12535 Transferwise Receive a discount on your first transfer.https://transferwise.com/u/sunnym11 AirBnB I like AirBnB – Click here and get $40 off your first adventure!https://www.airbnb.com/c/sunnym163?currency=USD Drop Shipping https://www.printful.com/a/5590646:9e93160081d2b1ea97c6ee505adafd40https://printify.grsm.io/6n4th1y5ku5w

  • Hosting Provider Affiliates

    Digital Ocean My preferred cloud services. Get $100 in credit over 60 days. Once they’ve spent $25.https://m.do.co/c/8c4241ce3f7f SiteGround WordPress.org recommended WordPress hosting.https://www.siteground.com/index.htm?afcode=6c144e937017630bd78e23953919cbe7 Flywheel Super simple managed WordPress hosting for low traffic websites.https://share.getf.ly/u92b4g Kinsta Kinsta is a managed WordPress hosting provider that I recommend for high traffic WordPress hosting.https://kinsta.com/plans/?kaid=CBXZUMYDQAOB  Gridpane https://portal.gridpane.com/aff.php?aff=11 Cloudways https://www.cloudways.com/en/?id=737926

  • Schema Types

    Schema.org – Structured website metadata for search engines. Helps create Rich Snippets (google.com widgets). JSON-LD – Metadata using JSON. Google’s prefered markup. ((https://jsonld.com/google-loves-json-ld-seo/)) Microdata – Part of the HTML Standard RDFa – W3C Recommendation for adding metadata to HTML and other XML based documents OpenGraph – Metadata for social media (twitter and facebook, etc..)

  • Migrate a WordPress Website with UpdraftPlus for Free (without Migrator or UpdraftClone)

    How to Move a WordPress Site to a New Host We often need to move a WordPress website to a new server or set up locally. I will usually use Wordmove and SSH to do this. But sometimes the client does not have SSH access to the server. In this case I will usually use…

  • Search and Replace with wp-cli

    wp search-replace oldsite.com newsite.com

  • WordPress directory and file ownership and permissions

    Is WordPress failing to upload, install, or update your plugins, themes, or media files? It’s possible that your directory and file permissions are not set correctly. chown The chown command allows you to change user and group ownership for files and directories. Recursively change user and group ownership of all directories and files to www-data:www-data, from the…

  • Regenerate image sizes in WordPress

    Regenerate your site’s images.

  • Delete image sizes from WordPress

    Easily delete images sizes from the command line.This is permanent!

  • Testing AMP Pages

    Add #development=1 to the URL of a page you wish to validate. Add #log=1 to the URL of a page to view logged errors. Logged messages appear in the browser’s console.

  • Compile custom WordPress style.min.css from scss source files

    It may be beneficial to dequeue the default WordPress Gutenberg block styles.min.css and compile your own from the source scss files. The WordPress blocks css files is located here, wp-includes/css/dist/block-library/style.min.css The WordPress blocks source files are located here,https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library npm install the source files, npm install @wordpress/base-styles –save-dev npm install @wordpress/block-library –save-dev Remove Gutenberg Block Library…

  • Install WordPress with wordops

    + nginx fastcgi_cache, php 7.4, and Let’s encrypt

  • Maintaining Wordops

    Upgrade Wordops to latest version wo update Maintaining Wordops stack wo maintenanceUpdate server packages (After SSH the message may appear, “…updates can be installed immediately”). Note that you’r WordPress sites may go down for a minute during, “updating packages, please wait…”. At this point users may see the WordPress message, “Error Establishing a Database Connection.”This…

  • Setup wordops

    #Install wget -qO wo wops.cc && sudo bash wo source /etc/bash_completion.d/wo_auto.rc # bash_completion #Alias for sudo wo echo -e “alias wo=’sudo -E wo'” >> $HOME/.bashrc source $HOME/.bashrc

  • Users

    List all usersgetent passwd {1000..60000}

  • Update Ubuntu

    update, upgrade , auto remove

  • System restart

    *** System Restart Required *** message on ssh login

  • Ubuntu bin directories

  • Creating a new WordPress user from the command line with wp-cli

    It may be simpler to update an existing user. e.g.

  • Change post type

  • Optimize WordPress images

    Easily optimize images using wp-cli, https://github.com/TypistTech/image-optimize-command

  • wp import backup.sql.gz

    Import a gzip compressed database

  • Settings up a new WordPress install with wp-cli

    List of often used wp-cli commands