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 🙂
Related Posts:
- When is wp_loaded initiated only with admin or only when user enters the site or both?
- Access bloginfo, get_option, and plugins_url from a non-core php file
- How can I call wp-load.php in my plugin file
- Is get_option function cached?
- How to include jQuery and JavaScript files correctly?
- $_POST form request with admin-post
- How do I log plugin (cron) actions?
- How can I run AJAX on a button click event?
- Adding pre-publish checks with Gutenberg
- Error getting correct blog_id on MU from functions.php
- How Do I Make WordPress Run an Event Every Day?
- How can I change the frequency of a scheduled event?
- Front-End Form Submission in Shortcode
- How to check if certain plugin exists and in expected version
- How to add SQL file with PHP to WordPress database [closed]
- Plugin Localization
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- array_map() for sanitizing $_POST
- calling jquery function on plugin page
- Is there a faster way than wp_insert_post to add content to a blog
- How to include external library in wordpress plugin
- Delete a specific item menu when I deactivate my plugin
- Ajax in WordPress – path issue
- Platform/Website that Supports Crowd-Funded WordPress Projects? [closed]
- Get user id for delete and update selected user
- How can I call template partials inside my custom plugin
- Decrease RSS cache time in plugin?
- Add version query tag to all images
- Creating table with plugin is not working
- How to add a custom tag in contact form 7 and change the output in email?
- How to delete an user including data from custom database tables
- How can I create a plugin that changes the title color of a website?
- How to check if Woocommerce Order number equals to post ID?
- Add custom element ID depending where the widget place is, sidebar or footer
- My plugin class doesn’t work! [closed]
- Call PHP file within a plugin to activate function
- add_action not calling back to function
- Example Dashboard Widget, Cancel not working
- Woocommerce checkout update totals with datepicker
- correct way to call javascript into hook function
- Multiple options pages validation for a plugin
- How to get plugin activate URL to use URL vars?
- rewrite URL based on selected taxonomy for post page
- Woocommerce – Convert Delivery method into a custom field
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- Testing Rewrite Rules with PHPUnit
- Add a page in admin without adding menu item
- Possible to get all posts with my shortcode?
- Avoid updating post when sending POST or GET request to post.php
- should i be checking for jquery before enqueing it in a plugin
- How to prevent someone from entering strings without making it available for translation?
- WordPress theme options Menu
- Add information to HTTP Header in WordPress Plugin
- What’s wrong with my usage of add_filter
- Moving/dragging a metabox removes TinyMCE’s content
- How can I develop a plugin that generates a page dynamically
- Catching Gutenberg sidebar switch event
- Can’t retrieve body params from PUT endpoint using formdata
- Redirect in WordPress plugin
- Converting data-name editor plugin to Gutenberg plugin
- Forward an old url rewrite scheme to a new one?
- $wpdb in php 5.5
- how to display a string in admin_notices hook from a class plugin
- How to Find a Gallery’s ID
- WP 3.3 makes it possible to add meta box to Category Editor Screen?
- Widget instance options not showing correctly
- Why does website stretch and white space on load? [duplicate]
- Access to the template file of a plug-in
- Can’t remove action hook on plugin class
- Bootstrap within shortcode
- How to create a custom wordpress plugin
- How to make premium plugin? I want to limit it until verification
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- How to grab data after wp user search is complete
- Undefined cache functions in my custom plugin
- How to direct WordPress to load custom template for custom post type
- get_the_tags doesn’t works?
- WordPress discards PNG file when uploading plugin file
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Nested Hooks with do_action for performance reasons – safe/necessary?
- Registration Forms
- Replace the WordPress Media Library Uploader
- do_action from within a class does not seem to work
- My plugin showing “Are you sure you want to do this” on screen with a “Argument #2 is not an array in load.php’
- Experts opinions needed: How (in)secure is this approach?
- add_option_{$option} action hook not being called
- Remove all capabilities in separate method fails versus included in method
- WP API users per page
- action callback, for action dispatched as reported by hook sniffer, not called
- variable created in page.php is null inside of header.php
- Access WordPress Tag Function From Modal
- Get Core Functionality from Within a (Secondary) Plugin File
- how can I insert a link on login page
- Shortcode attribute “title” doesn’t appear in $atts array
- Need someone to help you want to manage points for members to code interface functions? thank you
- Call API on post save/update and show the result in admin area
- Is there any other ways to replicating changes on live from staging without pushing from git
- Run different permission_callback depending on HTTP method of custom REST API endpoint
- upload image to wordpress media library failed for custom post type