How to get option values without requiring wp-load?

You could use Hooks , If you wish to print some styles in head just try add_action(‘wp_head’, ‘test_123’); function test_123(){ $options = get_option(‘option’); //Output it however you want 🙂 ob_start(); ?> <style type=”text/css” id=”someStyleInHead”> body.home{ font-size: <?php echo $options[‘fs_h’]; ?>; } </style> <?php $code = ob_get_clean(); echo $code; } I hope it help 🙂

Getting Fatal error: Uncaught Error: Call to undefined function plugin_dir_path() when linking to another file within my wordpress plugin

I solved the problem using the admin_url() wordpress function. In order to link to another page in the plugin or even to another plugin within my project, I did it by passing the registered url to admin_url() function. <a href=”https://wordpress.stackexchange.com/questions/367725/<?php echo admin_url(“admin.php?page=edit-member-page&id=’.$id);?>”>John Smit`h</a> //The $id variable passed to the link will be retrieved by use … Read more

How to load WordPress on non WP page?

The shortest way is to load wp-load.php and abort the loading of the template engine (Note: You couldn’t do that, if you’d be loading the header file, like you see it on many sites in the interweb). # No need for the template engine define( ‘WP_USE_THEMES’, false ); # Load WordPress Core // Assuming we’re … Read more