Skip to content
煇^舍
  • Home
  • About
  • Projects
    • AU
      • Alicia Pilates
      • Clare Wood (22)
      • Funct’l Movem’t Club (20)Project from 1-Ming started on 2020-08-28 and Cutover on 2020-09-20.
      • Gordon Flooring (22)
      • Hunton Executive (20)First project using Elementor Pro in Nov 2020.
      • Lucky Punts (22)The site was developed by others. The work here is mainly enhancements.
      • RE Collective (21)
      • The Design Order Store
    • HK
      • EC HealthCare
      • Fai RoomMy own blog website for knowledge management.
      • IOT
      • mj1900Project on setting up the MJ1900 Server running on Debian 9.
      • NPC
      • RebornA project from Ting;s company UMH.
  • Blog
    • Cars
    • IT
      • Codings
      • MicroController
      • PCs
      • Servers
    • Courses
      • C
      • C++
      • Vue 3
  • Toggle website search

Codings

  1. Home>
  2. Codings>
  3. Page 4

PHP – Trim a text string to max number of words

  • Post category:Codings

function trim_words($string, $max_words) { $stringArr = explode(' ', $string); if(count($stringArr) > $max_words && $max_words > 0) { $string…

Continue ReadingPHP – Trim a text string to max number of words
Tags: php

WordPress Upload – file types restriction

  • Post category:Codings

Reference: How to Upload Additional File Types in WordPress (by Antonio Villegas) WordPress only allows file uploading into…

Continue ReadingWordPress Upload – file types restriction
Tags: wordpress

WordPress – some conditions check

  • Post category:Codings

is_front_page() is_single() Returns true if the item is post, not page. It also accepts ID and name parameter…

Continue ReadingWordPress – some conditions check
Tags: php, wordpress

WordPress – Add Custom Widget Area

  • Post category:Codings

Reference: Add a new widget area to a WordPress theme (by Keith Curreri on October 26, 2010) Add…

Continue ReadingWordPress – Add Custom Widget Area
Tags: php, wordpress

WordPress – Create Shortcode

  • Post category:Codings

Reference: HOW TO CREATE YOUR OWN WORDPRESS SHORTCODESBY SARA VIEIRA | JUN. 04, 2013 In functions.php, create the…

Continue ReadingWordPress – Create Shortcode
Tags: php, wordpress

WordPress – a Shortcode for Bottom Page Content

  • Post category:Codings

In the past, the approach for creating the BPC is to first create a page template using the…

Continue ReadingWordPress – a Shortcode for Bottom Page Content
Tags: php, wordpress

WordPress Template Hierarchy and Tags

  • Post category:Codings

Template hierarchy WordPress uses the query string to decide which template or set of templates should be used to display…

Continue ReadingWordPress Template Hierarchy and Tags
Tags: php, wordpress

WordPress Loop

  • Post category:Codings

"The Loop" is the main process of WordPress. You use The Loop in your template files to show posts to visitors.…

Continue ReadingWordPress Loop
Tags: php, wordpress

WordPress Security

  • Post category:Codings

The following security measures should be observed when creating new folders or files in Wordpress: Every folder should…

Continue ReadingWordPress Security
Tags: security, wordpress

Inspect PHP variables

  • Post category:Codings

The cu-debug-functions.php contains two functions which can inspect variables in php codes. data_console( mixed $var, String $label =…

Continue ReadingInspect PHP variables
Tags: php, wordpress

Offset Anchor Point scrolling

  • Post category:Codings

To have a more precise control of the scrolling to an 'a' tag, or anchor point, two methods…

Continue ReadingOffset Anchor Point scrolling
Tags: css, html, jquery, wordpress

WordPress Hooks Firing Sequence

  • Post category:Codings

There are two resources, the WP Hook Database by Adam Brown and WordPress’ Code Reference to search for hooks. These two are great,…

Continue ReadingWordPress Hooks Firing Sequence
Tags: hooks, wordpress

WordPress Global Variables

  • Post category:Codings

IntroductionWordPress-specific global variables are used throughout WordPress code for various reasons. Almost all data that WordPress generates can…

Continue ReadingWordPress Global Variables
Tags: wordpress

@font-face rules

  • Post category:Codings

Using @font-face rules for custom fonts. Note that all font-family values are the same. Style and weight are set to the values corresponding…

Continue Reading@font-face rules
Tags: css, wordpress

Contact From 7 – get data from another page

  • Post category:Codings/Reborn

In Dr Reborn Revamp project, it is necessary to pass a data from one page to another page…

Continue ReadingContact From 7 – get data from another page
Tags: cf7, wordpress

WordPress “Load More” button
– Youtube summary

  • Post category:Codings/Reborn

https://www.youtube.com/watch?v=GyjoTwXR8gY 2020-08-10 The Load More button is required in the Dr Reborn project. Video source: Make Load more…

Continue ReadingWordPress “Load More” button
– Youtube summary
Tags: jquery, wordpress

Translatepress Plugin –
show alternative language switch only

  • Post category:Codings/Reborn

The CSS below is taken from the official website. When the page is displaying Traditional Chinese, only the…

Continue ReadingTranslatepress Plugin –
show alternative language switch only
Tags: css, wordpress
  • Go to the previous page
  • 1
  • 2
  • 3
  • 4

Categories

Recent Posts

  • BYD Sealion 7
  • Test word count plugin
  • WooCommerce Resources
  • YourTube Download Library “yt-dlp”
  • Set up Google Wallet Pass

Archives

Tags

apache (1) aws (2) C (21) C++ (10) cf7 (6) coding (8) css (38) elementor (20) esp-idf (4) esp32 (4) hooks (2) html (15) javascript (12) jquery (6) lightsail (2) linux (9) linux-commands (3) mobile (1) network (4) performance (4) php (27) plugin (20) security (2) sftp (2) shopify (2) ultrawide (1) vimeo (1) vue (3) woocommerce (2) wordpress (91) youtube (5)

Search

Quick Links

  • Home
  • Codings
  • Servers

Categories

Tags

apache (1) aws (2) C (21) C++ (10) cf7 (6) coding (8) css (38) elementor (20) esp-idf (4) esp32 (4) hooks (2) html (15) javascript (12) jquery (6) lightsail (2) linux (9) linux-commands (3) mobile (1) network (4) performance (4) php (27) plugin (20) security (2) sftp (2) shopify (2) ultrawide (1) vimeo (1) vue (3) woocommerce (2) wordpress (91) youtube (5)
© Copyright [oceanwp_date] - 煇^舍
  • Home
  • About
  • Projects
    • AU
      • Alicia Pilates
      • Clare Wood (22)
      • Funct’l Movem’t Club (20)
      • Gordon Flooring (22)
      • Hunton Executive (20)
      • Lucky Punts (22)
      • RE Collective (21)
      • The Design Order Store
    • HK
      • EC HealthCare
      • Fai Room
      • IOT
      • mj1900
      • NPC
      • Reborn
  • Blog
    • Cars
    • IT
      • Codings
      • MicroController
      • PCs
      • Servers
    • Courses
      • C
      • C++
      • Vue 3
  • Toggle website search
Type your search
We use cookies to improve user experience. If you continue to browse this website would imply that you agree to our use of cookies here.
Accept & Close
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
cookielawinfo-checkbox-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-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
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-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-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.
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.
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.
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.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT