You are returning the result of calling include
. You want to grab the output of the included file and return than instead. Use output buffering to do that.
function build_total_search_method( $atts ) {
ob_start();
include( dirname(__FILE__) . "/includes/total_search.php" );
$shorcode_php_function = ob_get_clean();
return $shorcode_php_function;
}
add_shortcode( 'total_search', 'build_total_search_method' );
Related Posts:
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- How to put JQuery/Ajax inside shortcode?
- Can someone please tell me what is wrong with my plugin?
- WordPress function not being called from jQuery method
- Create shortcode to echo javascript
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- How to prevent tabs from opening all at once
- Load CSS files in header of Bones theme?
- JS working when used normally but not in wordpress
- Trying to override/intercept a PhotoMosaic gallery link in WordPress using jQuery
- Display file contents within Plugin
- Change upload folder for a CPT
- Need to change url paramenter of share product pintrest [closed]
- How to tie dark mode with prefers-color-scheme webkit? [closed]
- AddToAny shortcode in the loop
- Ajax contact form widget plugin data not insert in database
- Time consuming callbacks in customizer
- How to add an automatic refresh in WordPress for a Page/Post or an embedded OneDrive/Excel HTML Code?
- How to fix wrong attribute error for Visual Composer Grid Builder?
- Making a Template for a CPT created by a plugin
- creating html reusable blocks via shortcodes
- Modifying a .js Function for Print [QZ Tray, WooCommerce POS]
- add_shortcode is not working in plugin where others are working
- Single API call exposed via shortcode with params
- How to hide CSS by default and show on button press
- SEO Friendly URL on dynamic product page produced via shortcode
- Uncaught TypeError: jQuery(…).flipster is not a function in wordpress
- Shortcode Plugin to dynamically build a shortcode via `do_shortcode` not working
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- Best place for short bio,image and button [closed]
- Use of Templates in a Plugin
- Insert content of a post into another
- jQuery for custom plugin not working with Divi theme
- Include comments form in plugin page
- accessing wp.media api from a tinymce plugin
- Creating shortcodes in plugin
- Visual Composer shortcode for child theme dir
- get_post_title is not working on homepage
- Some code in shortcode function being ignored
- Redux Framework: Page freezes on typing in Editor
- How can I inject options into an select tag inside the widget form?
- jquery tinymce and bundled wp plugins
- WP Plugins – Use includes to display page content
- Display wordpress post’s in popup?
- How to create a custom shortcode based on the layout?
- How to prevent plugins from loading jQuery
- Using color picker in plugin, does input attribute order matter?
- JQuery plugin that works with Google 1.10.2 and not with WordPress 1.10.2
- Loading a purchased jquery plugin in a wordpress theme
- Using window.onload with Ubermenu
- Unable to add TAB character to post?
- Post Comments with Ajax in WordPress
- plugin shortcode output
- jQuery | JJ Carousel Plugin – Can’t set speed [closed]
- How to Create a shortcode to this php function
- Inject HTML meta tag inside wordpress tag using add_shortcode
- How do I apply style to each category of a list?
- Integrating jQuery Datatables with Editor into wordpress admin
- how to insert data in wordpress table usnig jquery ajax
- Stop WordPress processing Javascript as text
- Jquery plugin not working on single pages
- Jquery NoConflict Problem
- Redirect to another page using contact form 7? [closed]
- What is @Action in WordPress?
- this jQuery function works perfect in static html page but not on wordpress
- How to include this jQuery File in wordpress?
- Custom Shortcode Broken in WordPress 3.1
- Use $_GET inside a shortcode print empty Array
- Namespaced shortcode?
- Where are theme codes located for WordPress?
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- “Conflict” with jQuery (or its plugins)?
- My plugin won’t return anything [closed]
- How does one include the JQuery UI plugin to wordpress and enque it correctly in a plugin form?
- Anyway to convert a plugin to become a shortcode?
- Render Modula Plugin Shortcode On Ajax Request
- Shortcode to update user meta
- a weird attribute on every html tag
- Why shortcode always displayed after footer not in body
- How to have sample page for each new register users in a membership website
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- using do_shortcode
- Why am I unable to load scripts in head in plugin?
- How to add an element right after the article using jQuery?
- Deactivate JS Script in Plugin Shortcode
- plugin shortcode not working on ajax request call
- Displayed content disappears when adding attributes to shortcode
- Modify page title and subtitle with a plugin
- How to track clicks
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- Where to find the code used to render a page that has a shortcode and a template defined?
- Shortcode not working after move wordpress website files
- wordpress add_action() issue in ajax call
- Remove Yoast jQuery from front end
- Shortcode not getting replaced
- How to display checked posts on another page over AJAX? (like comparasion style)