Monday, June 13, 2022
HomeWordPress Developmentclasses - Add properties to time period object

classes – Add properties to time period object


A typical WP_Term Object, for class would possibly appear like this;

WP_Term Object
(
  [term_id] => 5
  [name] => Information and Views
  [slug] => news-and-views
  [term_group] => 0
  [term_taxonomy_id] => 5
  [taxonomy] => class
  [description] => 
  [parent] => 0
  [count] => 22
  [filter] => uncooked
  [term_order] => 1
  [cat_ID] => 5
  [category_count] => 22
  [category_description] => 
  [cat_name] => Information and Views
  [category_nicename] => news-and-views
  [category_parent] => 0
)

It could be very fascinating to have a singular title. Is there a option to prolong the WP_Term class with a hook so as to add singular_name property?

I realise that it’s attainable with ACF however this isn’t actually meta knowledge

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments