Remove the action from it’s hook, then add it to a different hook (corresponding to where you’d like it to display). You can view the available hooks by viewing the WooCommerce single-product.php
and content-single-product.php
template files. Just like it all of WordPress anywhere there is a do_action( 'some_hook_name' )
that signifies an action hook that you can attach functions to. Here is an example (for your functions.php
) that will move the related products output to outside the #product div.
function wpa_115808(){
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
add_action( 'woocommerce_after_single_product', 'woocommerce_output_related_products' );
}
add_action( 'woocommerce_before_main_content', 'wpa_115808' );
Related Posts:
- Best collection of code for your 'functions.php' file [closed]
- Tips for using WordPress as a CMS? [closed]
- Updates for a private plugin?
- is_plugin_active() returning false on active plugin
- Unable to check if plugin is active
- How to Delete All regenerated thumbnails but keep the original ones?
- if plugin is active? check if plugin is enabled or not?
- How to upload image with simple form?
- Making plugin unique to not conflict with plugins with the same name
- Seeking clarification on page request life-cycle
- How to store ACF custom fields data in a custom table
- How to get posts by content?
- Modify the_content after the more tag
- Too many variations in WooCommerce
- Trying to disable plugins doens’t work
- How is the ” wp_get_update_data ” function used?
- woocommerce hook publish product
- Plugins won’t update when WordPress says they’re updated
- WordPress multiple widget in single plugin
- Layout shop page: resize images and columns
- How do you install the automattic developer plugin under localhost for mamp when there is an error, deprecated?
- Invalid shipping method, WooCommerce [closed]
- Plugin not saving values when placed in a folder within /wp-content/plugins
- How to integrate plugin in WordPress theme
- WordPress with Git deployment issues
- Set WordPress TinyMCE Editor To Readonly
- Creating Tables on Network Activation
- Different UI in WordPress
- How to add links in .po (language) file in wordpress?
- Does any one have Idea to get these functionalities with the plugin wp-multi-network
- How can I make 2 plugins that include different versions of a framework to both use the latest version?
- Add Plugin options as subpage to Theme options page
- Image upload and download from front-end
- correct way to include a library(and its dependent libraries) in wordpress development
- Issue Tracker from pre exsisting table [closed]
- Changing page URL and connect newsletter to MailChip
- Git Hosting for WordPress SVN Plugin Repository [closed]
- How to enable AMP for custom single template with custom database
- Problem with the Loop – want to limit the access to three free articles
- WordPress and a secondary database?
- Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?
- How to reorder and display a feed to be chronological?
- Woocommerce: how to change ‘Cart Updated’ message [closed]
- Stop Plugin from Getting Styles from Other Plugin
- Front-end CSS Library for plugin [closed]
- Default taxonomy template in plugin, override in theme
- WordPress Plugins Don’t Automatically Update
- Simply poll & Events Calendar plugins clashing
- WordPress plugin Post Creation [closed]
- How to remove index meta tag
- don’t call ajax if not plugin page
- How I can change the required capability for an admin menu without editing the plugin file?
- How to add support for caching plugins for my own plugin?
- wp_loaded with static Singleton
- How to remove a CPT Menu from the Root Admin only
- Get post_id on clicking a link in WordPress
- WordPress.org: How to add a plugin for certain countries?
- Wp Debug Enabled True Notices and Warning
- Webservice credential storage [duplicate]
- Development workflow for WordPress using git – issues with plugins and bloginfo(‘wpurl’)
- Is there a Image Gallery which will load all my posted Images like twitter’s image grid?
- Constructing a Pay to Download music website with wordpress
- Installing a Plugin ( Which is already manually uploaded )
- How to use wordpress plugin functions on my “home” page?
- Uninstalling IntenseDebate
- how i could put my id in the meta field ‘meta-value’
- WooComerce Deposit: set specific shipping method and quantity based deposit amount
- Menu not closing after clicking – WordPress – Elementor
- how i retreive the post content while editing it in real time however the editor is tinymce or gutenberg
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Is there a way to auto generate poster image for videos
- Membership and search criteria
- wp_create_user not working on plugin file
- Different Google Analytics code based on Users Device
- On wp-admin menu, the slider revolution option leads to a 404 error, page not found
- Will downloading a page builder plugin delete my existing data?
- How to submit custom form data using ajax to HubSpot form?
- How to make my wordpress site Multi-region
- Unable to import complete data remote wp-cli wordpress
- Register setting on plugin activation
- Add a filter to a method in the parent theme
- WordPress not displaying information on post sent from custom admin form
- Problem with Duplicate Meta / tag description in Webmaster Tool [duplicate]
- Add “selected” class to custom taxonomy dropdown search
- page creator to leave comments ONLY
- How to get the parameters on page and avoid 404?
- Working on fixing wp-front-end-editor, encountering undefined index
- How to add plugin activity in the menus?
- Shrinktheweb plugin problem
- Backup Buddy Questions
- Publishing videos and images from blog to facebook
- Share Button Like SuperUser
- Remove base from the custom post type URL [duplicate]
- Trying to display posts but getting the pages as output
- How to show random feed from DB and show content in my site
- How to escape html code?
- I want to set a different banner for each product in the woocommerce plugin on my wordpress site
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)
- How to override plugin function in code snippets WordPress
- how to make yoast seo read text from custom fields in custom post type