First, if meta key is isbn_metadata is the meta_key you should specify this meta key instead of _isbn.
Second, get_post_meta return an array unless you set the third parameter to true. So, you can do this:
function get_kalahari_affiliate_link() {
$isbn_metadata = get_post_meta( get_the_ID(), 'isbn_metadata', true );
if( ! empty( $isbn_metadata ) ) {
$link = 'http://etrader.kalahari.net/referral.asp?linkid=5&partnerid=5710&ISBN=' . $isbn_metadata;
} else {
//Empty string or you can set any other value for control
$link = '';
}
return $link;
}
Note: You are using get_the_ID() , I assume you are executing the function inside the loop as required by get_the_ID().
About the widget areas problem, as you are using a third party software, you should ask to the developer.
Related Posts:
- Best collection of code for your 'functions.php' file [closed]
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Where do I put the code snippets I found here or somewhere else on the web?
- How do I call wp_get_current_user() in a plugin when plugins are loaded before pluggable.php?
- How to include a plugin’s php file to another plugin functions file [duplicate]
- How to remove WPML Generator Meta Tag by theme’s functions.php (override plugin function)? [closed]
- if plugin is active? check if plugin is enabled or not?
- Define Function in functions.php or plugin and call in theme loop
- Autogenerate wordpress shortcodes using array?
- How to override a theme function (within a class) using a plugin
- WooCommerce create new product and add to cart on form submit
- Seeking clarification on page request life-cycle
- How to assign user a role if none is present when logging in
- Change destination author link
- Shortcode under a Shortcode Multiple times Possible?
- How to call a plugin function in footer.php
- How to remove action from plugin?
- Over write plugin templates
- How to find out what blocks are added by a plugin
- Override plugin functions in functions.php
- Using has_filter with a class based plugin to check whether the plugin is active or not
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- ajax front-end increment views on click
- Display a text message if the field is not found and not if found
- Scope for PHP Variables Assigned in functions.php or a plugin
- Override the filter from plugin in child theme
- Add a plugin before main container
- Get all categories of custom post even not assigned
- Function to prevent users from trashing comments
- How does WordPress process plugin installations?
- How to create TEMPORARY Download links in a wordpress POST?
- Conditionally add apt. Open Graph meta data to different pages on WordPress site
- plugin development: problem with functions
- Dropdown menu on custom page with product to choose number of products per page
- How to append to title via functions.php for auto-posting plugin [duplicate]
- Bootstrap Drop Down menu is not working
- wordpress plugin is not activating from widget
- Custom random quote widget breaks when used in multiple sidebars
- How to change constants in WordPress wp-config.php programmatically?
- How to use a class from another plugin
- Override Plugin Script Fucnction in WordPress
- How to call WordPress function other files
- Conditional attributes and logic per product category
- How to remove custom post type and add category and post name
- WordPress get_avatar function not correct working
- WordPress metaboxes – textfield suggestion automatically populated
- Which file of wordpress manage plugins functionalities?
- Improving the perfomance of a plugin action
- Check if variable is set in filter
- Image change on hover
- Passing stored variables to add_filter
- JQuery prepend a function
- Why can’t I call a (member) function from within a foreach?
- Shortcode Attributes to Return different $_POST
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Send email with list of active plugins upon activation/deactivation
- Using custom fields for image alt and title
- Where Should i write the code for wordpress ajax voting?
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- How do I convert my WordPress website to be domain agnostic?
- Add the_post_thumbnail_url to a shortcode in function.php
- Add action to custom Function
- Show media-uploads to all users
- Call javascript functions from each page
- Add_image_size not generating correct size
- How can i call a functions.php function, from inside my plugin class?
- How to make WooCommerce payment method field optional?
- WordPress Custom Hook with Class method
- Allow a particular user to access a particular plugin?
- how to define a html folder to make it work with WordPress commands
- add a hook of Woocommerce to a plugin but it only shows and doesn’t function properly
- ACF Fields are not showing up on Homepage
- Securing langugae folder
- Call function with button and return response
- Change custom rewrite rule when permalink is updated/changed
- Return function results within shortcode
- Why is WP template_include overwritting all templates rather than specified page?
- How to Call Function From Separate WordPress Install on Same Server?
- How to echo a plugin’s function into a template?
- Find all strings between an enclosing shortcode
- Wp Ecommerce Reposition Product Page Product Thumbnail Image
- It possible to implement an adhoc php web application with wordpress?
- How to Overwrite validate_plugin function
- making a glossary with wordpress
- date function not correctly returning date
- Disable plugin function
- Access to wordpress method inside of classes
- How to prevent page load on form submission
- wordpress Search function is not working
- Send email notification when meet the condition
- WordPress: code structure
- PHP Creating a formula from mysql db values and db stored math operator
- How to Add Extra Text In WordPress Title Before Post Publish
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Gravity Forms and Gravity View Permissions
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- WordPress Convert queries to slashes using function.php
- Run a function only once when logging into dashboard
- add to cart linking to add to cart page
- How to call a logging function from a generic utility plugin from another plguin