Try use this (functions.php) :
function product_title($id) {
$custom='CustomField'; // Your custom field here
return get_post_meta($id, $custom, true);
}
and call func in your template (in loop and etc…):
<?php $p_title=product_title(get_the_ID()); ?>
<h3>Product : <?php echo ($P_title); ?> </h3>
Related Posts:
- Manually set global $post vars with an ID, in order to use template tags
- Place content inside the Post Loop
- Best collection of code for your 'functions.php' file [closed]
- How to include a plugin’s php file to another plugin functions file [duplicate]
- Output before and after the loop
- if plugin is active? check if plugin is enabled or not?
- Common functionality between my own plugins
- Editor access to plugin settings
- Generate Advanced Custom Fields box in custom admin menu page
- Saving Plugin settings to the database
- Shortcode display outside the div
- Custom Widget outputs the input but doesn’t save anything inside the textarea
- How can I let users to access plugin functions based on roles?
- Fastest way to loop through all posts?
- Use functionality of 2 wordpress plugins
- Can wp_script_is used in pluginA check if a script is being enqueued/registered from pluginB?
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- jQuery Plugin to use WordPress functions in AJAX request
- Where to place custom functions?
- I have functions in my wordpress plugin. How do I get them to work for me?
- Display content from custom post type if match to main post category
- how do i remove posts from a WP_Query so the pagination is right?
- AJAX button run function
- Change wordpress current_time function to different timezone
- Override global query results without hooks
- How to override a plugin function wrapped in a class?
- Edit Yoast SEO breadcrumbs output [closed]
- Display post lists in 2nd paragraph
- Using a post-signup hook to get user details
- Restrict media upload size by format
- How to display custom sidebar in wordpress 5.5.2
- creating html reusable blocks via shortcodes
- Replacing a plugin function with a custom renamed function doesn’t work
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- Insert content of a post into another
- Disqus deleted comments are syncing with wordpress but active comments do not
- 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
- Are there action hooks for comments?
- Shortcode Attributes to Return different $_POST
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Plugin onclick button activate other plugin
- 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?
- WordPress function to add text warning on every pages [closed]
- 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
- Help with a function in a widget
- how can authors to define custom pages?
- Polldaddy doesn’t show up on own theme
- Adding a Tag Parameter / Filter to My Shortcode
- How do I create pages within a WordPress post?
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- How to upload large media file in chunks, without any plugin?
- Allow a particular user to access a particular plugin?
- WP Function does not trigger on Webhook API Call
- Why do I need to reload the page for WordPress to see the new custom field added with jQuery
- Cookie value changes back to previous value after changing
- RSS Feed on WordPress showing code (hypertext) in articles titles
- Alternative Hook to the_content for Changing Background Color
- Unpublished Pages Failing To Appear On Custom Path
- Post source link plugin – small modification
- How to add specific script to WordPress webpage that will working with user input and databases
- Hide Plugin Custom Post Type Menu Link
- How to create algorithm for ordering posts in WordPress?
- Add external javascript to post template
- Block plugin update possibilities (but not by hiding notifications)
- Execute function activate/deactivate plugin in specific pages
- Securing langugae folder
- Plugin function in child theme
- Call function with button and return response
- Soflyy WP All Import Custom File Download Issue
- Update (a function) post’s featured image as soon as $image_url changes
- Why isn’t my plugin seeing other classes?
- Cannot reset a loop in a plugin template
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- making a glossary with wordpress
- Contact Form 7: custom validation [closed]
- functions.php conditional output for a single plugin
- date function not correctly returning date
- Single dash converted to double dash
- How use Dynamic hyperlink on each wordpress post?
- How to declare this function correctly?
- Can’t modify plugin function
- PHP if url extension action=discussion condition use [closed]
- 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?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- WordPress Convert queries to slashes using function.php
- FacetWP custom display based on post type [closed]