Class variables in shortcodes

Thanks to the response by @bueltge : Added extra line in the __construct() function: public function __construct() { $this->var = $this->shortcode_1(); //added add_shortcode( ‘the_single’, array( $this, ‘shortcode_2’ )); }

How do I create settings only used by my theme? [closed]

You don’t have to register_settigs, you can just add the options straight to the database with add_option(). You could have like a dummy option “all_pages_created” and if that’s set then don’t check for the individual pages. if (get_option(‘all_pages_created’) !== false) { // it’s set, do nothing } else { // check for your pages and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)