My Personal Junkyard

WordPress Custom Fields Plugin Snippet

A little snippetto show how customer fields works in WordPress Expected Usage

Class

WordPress show when article was published – x hours ago, Yesterday, and date

WordPress show when article was published x seconds ago 2 mins ago 14 hours ago Yesterday or date

WordPress class to update meta key

Expected usage

Class

Vue.js as Distributable Library

Vue.js as Distributable Library Github: https://github.com/Ansonhkg/distributable-vue-library/ Demo Cheat sheet Expected Usage Your Project Foo index.html Inside <head>

before </body>

Your Vue APP Build your app with this command

Reference: https://cli.vuejs.org/guide/build-targets.html#library

WordPress template with Timber and advanced custom fields.

Seting up WordPress development environment Git clone my repository git clone https://github.com/Ansonhkg/docker-wp-sql.git –branch bakery Run docker-compose up and wait for 20 seconds. Go to localhost and follow the installation. Install essential wordpress plugins Timber Github Git clone the theme to your themes directory.

Change the folder name. Change the Theme Name from style.css Change […]

My published shared components

Shared UI components https://github.com/Ansonhkg/bit-collection or https://bit.dev/ansonhkg or https://my-collection.now.sh Shared Javascript libraries https://github.com/Ansonhkg/utils or https://www.npmjs.com/package/@ansonhkg/utils

WordPress REST endpoint to accept special characters

WordPress REST endpoint to accept special Issue: unrecognized character in URL

Expected Usage

Output

WordPress register custom REST API

Structuring CSS for HTML Components. Separation of concerns.

Structuing CSS/HTML (Separation of concerns) First, I will divice CSS into categories: Settings

Color Scheme

General (eg. *, body, Scrollbar, etc.)

Rows (or wrapper components)

Layout (or grid components)

Content components A default content-default style Different types of content eg. content-title, content-description

Spacing components

Individual components

Quick VUE workflow for a HTML/CSS Template.

My quick VUE workflow for a HTML/CSS template. Create a project vue create hello-world Using Pre-Processors yarn add sass-loader node-sass Add scripts on mounted Expected Usage

method

Back to top