As per my understanding you wish to print content from get_option below . For that please write below code to funcitons.php file:
function my_facebook_tags() {
return $options = get_option("p2h_theme_options");
}
And below code within your header file below to wp_head() write:
<?php echo my_facebook_tags();?>
Hope this will resolve the issue for you!
EDITED:
Try the below code . It should output the desired result automatically in your header.
function my_facebook_tags() {
echo get_option("p2h_theme_options");
}
add_action('wp_head', 'my_facebook_tags');
Related Posts:
- Fatal error: Call to undefined function plugin_dir_path()
- Dynamic URL to reference custom PHP files
- Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions
- Disable External Pingacks on WordPress Posts and Only Allow ‘Self Pings’
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- Using wp_get_image_editor in a standalone script
- New Plugin Review
- Making Quote Plugin more efficient
- How to access function from outside of a class within this class in WP plugin?
- PHP can I add line numbers to file_get_contents()
- Adding Default Settings to Theme My Login plugin
- Swapping wp_dropdown_categories function with wp_category_checklist
- How to access global variable $menu inside a class function
- How can I remove a function that has been added to wordpress with add_filter?
- what is the best practice to add new field to an api route
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- How to call plugin function per site in a multisite?
- WordPress Custom field Colors
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- How to use html inside a functions.php code?
- Plugin Generate Unexpected output during activation
- Using data sent via AJAX in multiple functions on a WP plugin
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Custom meta box values are not getting saved for my custom post type
- how to save checkbox data for custom setting?
- Call to undefined function error in plugin
- Execute Jquery when a specific page in my plugin is loading
- send popup after wp_redirect()
- Using ACF Relationship field to set post type to draft or published status
- How to change basename url for wp-admin?
- How to Send Pingbacks for all Posts in WordPress?
- Reliable way to add nonce to HTTP Header in WordPress?
- Only the first image uploads
- Add Pre-Defined Value to Click Counter in WordPress
- Illegal string offset checkbox
- ssl redirect function is not working
- Custom plugin: how do I call a PHP file if settings option is set to true?
- How can i avoid duplicate same post in wp?
- Display a custom name when the user has no name settle in his account
- In a foreach loop, how can I add a meta value if it doesn’t exist?
- How to override theme’s public static function inside of a trait?
- Enqueue sripts and styles only if function is called
- post_exists stops working in a scheduled event
- Taxonomy Child Term, Counter is staying on 0
- PHP get_category() function redeclared
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Permission error on plugin save
- Trouble using wordpress functions in a pop-up modal form
- Issues separating my Plugin pages into different files
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- How do I change the Go To Categories link in the term_updated_messages
- WP Custom tables query
- Hide old attachments from wp media library
- PHP – redirect https to http and www to non-www
- simple wordpress ajax plugin not working when not logged in
- Need to get specific data from array
- Sort registered users by post count? (inside admin dashboard)
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- How to change a public function inside a class of a plugin?
- Function set default image when image not present
- WooCommerce – Reset quantity input field when variation changes
- Query all posts of a custom taxonomy term
- Trying to establish connection to External Database
- Login/logout in header
- Improve page speed loading using CDN and async or defer attribute
- How to abort saving data in save_extra_profile_fields function WordPress?
- Get the date of the className or classID
- Way to add captions to gallery images by code
- My custom get_the_excerpt() can’t get excerpt by ID
- WordPress Options Page Theory Question
- deactivating an active plugin using if page
- Any ideas why I am getting “I’m getting “wp-admin/admin-ajax.php 401 (Unauthorized)”
- Cant register rest routs from class instance
- How to use the checked() function to check for a non-empty var
- Pagination Not Working (pages duplicating content)
- Custom functions for string data calculations
- How are these PHP functions applied to a specific page in WordPress?
- “pre_get_posts” orderby custom date field in different format?
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- Trying to update Woocommerce meta values
- php code for outputting a custom page in my account
- Hide specific shipping methode depending on day and time of day
- Gutenberg blocks shortcodes compatibility
- Save custom field on WP_List_Table
- Load script and styles using an array of resources
- Add element after navigation element title don’t works like I expect
- Get Billing Email from WooCommece Checkout and Pass to Fullstory JS
- How to delete specific element when it is not homepage?
- How can I display a query in a page?
- Using catch_that_image() for galleries?
- Get category id for a custom category and display it in a class
- Conditional Content Display
- Password form redirection to belonging post
- How to add margin underneath woocommerce total price amount -> productpages
- Whats wrong with my code? Need To add String to shortcode? [closed]
- Suppress errors when using global function
- How to use js variable to php in wordpress functions.php
- Tags being Inserted in html from plugin PHP not passing through the_content