I don’t know for sure if this would work but this is where I’d start:
<?php $related_content = $related->show(get_the_ID()); ?>
<?php if($related_content): ?>
<div class="related"><strong>Related products</strong><br />
<?php echo $related_content; ?>
</div>
<?php endif; ?>
Related Posts:
- How can I use WordPress functions in my stylesheet?
- Plugin or mod for wordpress to make content publication SUPER easy
- Cropping, Re-sizing and Saving images from one folder to another folder in wordpress
- Creating search filter through plugin
- How to edit/delete single row items in a table on my own menu page
- Displaying Gravity Form data on WordPress page [closed]
- Get a list of galleries from an album in NextGEN Gallery [closed]
- Undefined property: WP_Post_Type::$ID
- How to trigger $_GET request within admin plugin page?
- Wp favorite posts get user favorites in profile using buddypress [closed]
- How to ‘clone’ a wp plugin to make small changes
- add mediaelement.js plugins into WordPress video player control bar
- Preferred way of cacheing a value in php
- Automatically add attributes to woocommerce product?
- Edit Yoast SEO breadcrumbs output [closed]
- Adding a slider captcha to the comment system
- Query all customers/users and check for duplicate information
- WordPress function not being called from jQuery method
- WordPress WPforms customization
- wp_remote_get() returns 403 while file_get_contents() does not
- How to save inputed data in a textbox [EDITED] [duplicate]
- Replace default og:image tag YOAST
- Where these .js file come to source code?
- WordPress Payment gateway add on form , how to add form into list or else how to submit form to next step for payment
- How I can internationalize variables within the function _e () __ (), etc?
- PHP Fatal error: Call to a member function locale() on a non-object
- How to delete all trashed item in one-go
- Why can’t I call a (member) function from within a foreach?
- How to redirect to same page after form submission
- Return multiple values in a shortcode attribute
- get specific value of a array | PHP
- How to add a new column with text fields to WooCommerce Cart List?
- Creating a functionality plugin to edit seriously simple podcasting
- Programatically upload a file to be stored inside blob field in database, NOT on filesystem
- Make plugin php file called directly aware of WordPress?
- dynamically create callback functions inside a for loop
- Creating an admin meta box to save post as pending
- Custom meta box with jQuery.sortable custom post type list
- Passing value as hidden parameter to next page
- Next Previous Post in wordpress with previous / next link with title?
- WordPress truncate posts question (plugin related)
- Different registration form for different roles
- Apply html elements in php statement
- WordPress Post HTML after Posting
- Settings options not showing up on Sub Menu page in WordPress plugin
- Cannot Access Console
- Plugin error after installation
- Get product categories and add them to a custom taxonomy
- woocommerce remove coupon link does not work
- Use a hook or filter, or overwrite this Gamipress function?
- add_rewrite_rule to load different page, without changing URL in browser
- Plugin or ways to limit number of users logging in the website,
- Replace old theme that understand old css (vcex_icon_box css_animation)
- How to insert datas in the table on wordpress?
- WP Ajax DB issues
- ACF checkbox return format based on page
- How to get database connection details without longing to cpanel in WordPress?
- The Build menu theme is frozen with the wordpress theme
- Does anyone know why my SEO and title become one?
- Precheck fields when I add a new post
- How to translate wordpress blog to other languages?
- How to translate to spanish wordpress hardcoded content/files?
- How to get a post views count using ‘WordPress popular posts’ plugin
- Get Shortcode output to database for static post_content
- Multiple image selection custom widget
- strtotime not working
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- How To Toggle User_Meta in frontend in a form using PHP
- Change Woo Custom Endpoint Titles from a Plugin
- Change custom rewrite rule when permalink is updated/changed
- Optimized PHP & WordPress settings for speed/performance?
- Speeding up WordPress on a Local Network
- How can I store user preferences in WordPress and retreive them later?
- Any method to make specific widget for every post and page?
- How to add php plugin code in theme
- how change my menu on submenu
- Plugin debugging with errors in activation routine
- Number format in thousands on highcharts in wpdatatable plugin
- Embed Javascript code to registered users only
- Find all strings between an enclosing shortcode
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- W3 Total Cache Can’t Really Detect Things
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- How do I add php to all links automatically?
- update_post_meta not working
- Pulling Advanced Custom Fields from other pages
- Vote It Up Plugin – Add ascending numbers to MostVotedAllTime Chart Function
- How to fix vanilla comments extra iframe space
- Meta Box plugin image_advanced not showing up on frontend
- Creating Features List in WordPress Post
- PHP Creating a formula from mysql db values and db stored math operator
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Posts in Admin only display 1 Post instead of all Post in admin area
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Creating a Table Row by Row
- Getting 504 Gateway Timeout Error on AWS Server! [closed]
- WordPress issue – data is not showing in wp-admin, but when searching through database, all the data is there
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database