There’s the get_post_meta()
function to retrieve those data.
So basically, you’d write a function in your functions.php file (or in a custom plugin – take “Hello Dolly” as example) and hook it.
<?php
/* Plugin Name: (#66495) »kaiser« Headway Title Button */
function wpse66495_headway_title_button()
{
return printf(
'<div class="title-btn"><a href="https://wordpress.stackexchange.com/questions/66495/%s" alt="https://wordpress.stackexchange.com/questions/66495/%s"><img src="%s /></a></div>'
,get_post_meta( get_the_ID(), 'meta_key_link_url', true )
,get_the_title()
,get_post_meta( get_the_ID(), 'meta_key_thumb_url', true )
);
}
add_action( 'headway_after_entry_title', 'wpse66495_headway_title_button' );
Related Posts:
- Add options to featured image
- post meta data clearing on autosave
- Assign category using custom field?
- What WordPress function to use to get meta value by using meta keys?
- Default Custom Field Value Automatically Update
- Prevent custom field from being updated after first publish
- How to change text color depending on the number value (Using javascript)
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- Creating a “Related Meta” type field?
- How to echo the translated custom field?
- update_post_meta not working in function
- Adding and updating repeating custom field meta data
- jQuery does not work
- ACF not showing
- Why does re-using this function not work? [closed]
- Pass parameter to hooked function using custom page template
- Override the WordPress core function wp_referer_field
- How to return hook data when multiple parameters are present?
- Hook into a function without a hook?
- Exclude from the query posts with meta_key and meta_value
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- How to edit the Tags within the image file URLs?
- How to retrieve the values of a sub-field in the first and last row of an (ACF) repeater inside function?
- Is my code correct to enqueue CSS on a specific page?
- Can’t properly set the_title add_filter to show short_URL
- How to get correct value from checked()?
- Control the srcset much more (not all sizes in it each time)
- How to add_filter html template to middle of content
- Filter yoast canonical add_action priority [closed]
- (Woocommerce) Order by price when entering specific category
- Get array of metakey in all posts
- How do I hook into the container of wp_nav_menu?
- Remove links from the_content when using filters wp_trim_excerpt
- Custom Behavior when Adding New Custom Post Type in Dashboard
- User function to return multiple get_post_meta()
- Is there a way to prevent a function/method from being called outside a specific hook?
- Auto log in hook is requiring a page refresh
- Hide custom fields when empty
- Possible to hook into Media Library preview File column and use a custom image?
- Function not working inside of a function in functions.php
- What are the meta fields for an attachment?
- Adding code before post title with the_title produces weird results
- Add back in child theme what the parent theme removed with remove_action
- Programmatically add Yoast meta description after post save
- Writing a function to detect an event
- Insert Address fields into function
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- WordPress wraps span tags into p tags
- How to make custom comment fields required
- Changing where my author box is printed
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- Add Adsense code between job listings – wp job manager plugin
- How add body_class from wp_termmeta
- Add a custom class to the body tag using custom fields
- How do I display a date correctly that is stored in the database as a backwards 8 digit number from Advanced Custom Fields? [closed]
- Sort and display pages with specific custom field (not tag)
- update_post_meta is Updating with two page id
- shorthand syntax for custom fields
- Fill empty custom field with other custom field
- Replace admin header logo with an image
- Hide a div when a custom field is empty
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- is_home() not working in functions.php file
- saving/reading custom field value does not work – no value gets POSTed
- How to conditionally add a widget via a hook in functions.php
- Perform function on publish AND save (not just save)
- How to place a div inside a function that creates a div
- Changing the text of Upload/Insert on Posts and Pages Screen
- Filter for replacing the WP_query object for a given category
- How to add or delete default value theme options while activate and deactivate theme
- Conditionally run function based on custom meta value?
- How to avoid saving empty data to sql while using add_meta_box
- How to Display WooCommerce Product Price in WooCommerce Archive
- WordPress comment processing . Default unapproved comments detection before posting
- Warning at top of website & top menu gone
- How to add custom metakey to shop_order page’s searching function?
- wp_set_object_term via js btn frontend
- Populate Product Regular Price with a calculated ACF Field Value
- Does hook have an effect on increasing the page load?
- Save_post – Warning: Cannot modify header information
- What is the earliest Hook a Script can use?
- Populate acf-field, depending on block name
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- Update wp_postmeta table based on 2 keys
- custom error message for empty username and password using authenticate filter not working
- How Do I Unhook This Parent Theme Function?
- Get post_author email for Zapier Integration
- blank page with wp_get_attachment
- How do I get the value of a current user’s custom field?
- Calling hooks in functions
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- Create New User Custom Field not Saving
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- How would I correctly implement a new if statement in a child functions file?
- Hide empty custom field
- How to add custom column into custom post, when field is select
- How can I stop the hook from breaking the login/logout function?
- Remove post from latest posts after a month only with certain tag
- save_post doesn’t correctly process function call with php class