Look at below function
function LoadNavigationFile($atts)
{
if ( ! empty( $atts['dirname_with_file'] ) ) {
$dirname_with_file = $atts['dirname_with_file'];
}
$str=include( get_template_directory() . $dirname_with_file );
}
Related Posts:
- Return HTML Template Page with PHP Function
- Is there a way to parse shortcodes in PHP?
- Shortcode to insert
- Shortcode putting html such as
- Display sorting options dropdown when using WooCommerce product category shortcode
- Retrieve multiple values passed to a single attribute in a shortcode
- ob_get_clean returns empty string, ob_get_flush outputs string
- Export User Info to CSV from Front End
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Shortcode created to check language not works
- Using Echo in ShortCode – Stuck
- Add/echo div with Analytics-Code to function in functions.php
- How do I hardcode a WordPress shortcode into my theme?
- My shortcode is showing up twice
- How to return multiples lines in a shortcode?
- How can I default to all WordPress roles when parameter is not included in shortcode?
- WordPress menu deletes when trying to add a hook
- PHP contact form returns warning in text widget [closed]
- How to find the output of contact form 7 shortcode? [closed]
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Recent post display using shortcode
- How do I turn a shortcode into PHP code?
- Need to turn this php into WP shortcode
- Making Quote Plugin more efficient
- How to return a foreach inside a shortcode
- custom shortcode will not display the wrapped content
- Shortcode content output but not in correct place
- PHP code inside shortcodes
- Create shortcodes within foreach loop (using array)
- Trigger popup in a php if/else statement
- Append HTML Using Shortcode
- How to output a PHP file values by shortcode?
- How to display data from custom table in wordpress phpmyadmin
- Pass php dynamic variable to shortcode
- How create a Shortcode with hover and complex options
- do_shortcode with custom field
- Remove echo from shortcode
- Excecuting php function in shortcode
- Returning data instead of echoing/printing
- displaying content that includes shortcodes within an echo
- List taxonomy term slugs within shortcode (do_shortcode)
- Display Data in Table from External Database in WP using Shortcodes
- do_action(), iFrame Gets Displayed Despite Password Protection [closed]
- Using Shortcode to Grab Archive Listing, Separate by Year
- Capitalize Shortcode Value on Output
- Why is my str_replace not working on short code submitted by front-end?
- List all blogs, but exclude the main site
- Shortcode not staying inside div tag
- Shortcode to pull posts
- PHP code inside Shortcode
- Help Fallback (thumbnail)
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- Shortcode function doesnt work without caption
- Action Hook Inside WordPress Plugin Shortcode
- How can I include the user id inside of a shortcode php output?
- PHP Helper Class to create shortcodes
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- Change Spaces to Dashes?
- Updating Metadata with Shortcode
- using shortcodes inside gravity forms
- How to Create custom block for displaying information in content section which act like shortcode
- Display logged in user name and lastname on page
- Create shortcode for metabox gallery
- Replace background image with post thumbnail in shortcode
- couldnt show short code atts in category
- Conditional formatting on data fetched from MYSQL
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Advanced Custom Forms PHP formatting for do_shortcode
- overwrite wordpress gallery with custom gallery shortcode
- How to use Contact Form 7 shortcode value in a page?
- Display current user metadata on WordPress page
- Add Shortcode to ::before class
- Reload page with a different shortcode when a user selects from a dropdown
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Shortcode’s output to use as other shortcode’s parameter
- Show products per shortcode
- Open/closed function [closed]
- Need to Echo A Url path to show on a wordpress page
- WordPress Shortcode based on other shortcode
- Force ‘permanent’ post cache of shortcode results
- Wrapping shortcode content in a span or link
- Formatting Shortcode to Display in Visual Mode
- Use html tags in shortcode_atts, is it real?
- How to pass parameter that ends up being part of a class name with wordpress shortcode
- How to have Function of a plugin using global vars into a shortcode?
- Overwriting a Shortcode
- Where to place PHP for shortcodes
- How to wrap a text with shortcode into php file?
- PHP Widget and do_shortcode
- Shortcode not passing variable to included file
- Whats wrong with my code? Need To add String to shortcode? [closed]
- A next page function with shortcode?
- using a shortcode in a hyperlink
- WP Custom tables query
- Display total count of products in orders of a specific order status
- Gutenberg – render_callback does not pass ToggleControl value on frontend
- HTTP 500 Error after Creating Shortcode
- How call WordPress shortcode inside function file
- How to execute a shortcode within a custom field?