Function settings_fields() not recognized (Uncaught Error: Call to undefined function settings_fields())

Nevermind guys, I found the problem by myself.. Original and wrong code: $this->pages = [ [ ‘page_title’ => ‘WT Domain Check’, ‘menu_title’ => ‘WTDomCheck’, ‘capability’ => ‘manage_options’, ‘menu_slug’ => ‘wtdomaincheck’, ‘callback’ => $this->LoadSettingTemplate(), ‘icon_url’ => ‘dashicons-store’, ‘position’ => 117 ] ]; Corrected line: ‘callback’ => array($this,’LoadSettingTemplate’),

Share functions between admin and frontend

That boilerplate uses autoloading, take advantage of it! I understand it’s a bit overwhelming but with some training you will realize that autoloading and OOP are a superlative productivity boost. Inside inc/common create your class (for example, class-commonclass.php) <?php namespace PGC_Signoffs\Inc\Common; \\declare the namespace for autoloading class CommonClass { public function commonFunction($a,$b,$c){ //could also be … Read more

Author Meta in Author URL Link

This is just an example / idea and I haven’t tested if this really works. But I think it could be something along these lines. function custom_author_base() { global $wp_rewrite; global $wp_query; // On author pages you get current author for example with $wp_query $curauth = $wp_query->get_queried_object(); // Get the required data $country = get_user_meta($curauth->ID, … Read more