The second argument of any WP shortcode is the content found inside the shortcode block. Additionally, Not sure how you are trying to use forward slash on a shortcode name, slashes are not allowed as a part of shortcode name. Try it like –
function colored_box_shortcode( $atts, $content )
{
extract( shortcode_atts( array(
'color' => 'grey',
), $atts));
return
'<div class="shadow-wrapper half-shadow im-centered">
<div class="box-shadow shadow-effect-2">
<div class="servive-block servive-block-'. $color .'">'. $content .'</div>
</div>
</div>';
}
add_shortcode('box', 'colored_box_shortcode');
Related Posts:
- Get value from shortcode to do something
- How to pass parameters in wordpress shortcode?
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Shortcode to include PHP file, pass various parameters to include?
- Get URL from shortcode tag
- Embedding PHP in shortcode $content
- Shortcode with PHP issue “Undefined index”
- Excecuting php function in shortcode
- Only first shortcode gets executed
- Multiple do_shortcode in page template
- Returning data instead of echoing/printing
- echo something inside a shortcode
- displaying content that includes shortcodes within an echo
- List taxonomy term slugs within shortcode (do_shortcode)
- Shortcode from a function not working
- Display Data in Table from External Database in WP using Shortcodes
- get_posts works in the page template but not in a shortcode
- Is it possible to return content, and then also continue to do other things?
- ::before on open/close function [closed]
- anyway to put inside a $outprint=sprintf()
- Is There A Way To Make Theme Files Accept Shortcodes?
- How can I include shortcodes within PHP?
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Create a WordPress shortcode using PHP [duplicate]
- do_action(), iFrame Gets Displayed Despite Password Protection [closed]
- $wpdb returns duplicate posts
- Creating WordPress Shortcode with Variable
- Catchable fatal error: Object of class stdClass could not be converted to string
- Syntax error in a shortcode function
- Does anyone know all parameters of get_comments()
- Using Shortcode to Grab Archive Listing, Separate by Year
- Capitalize Shortcode Value on Output
- Shortcode to find and replace URL
- Why is my str_replace not working on short code submitted by front-end?
- Could use some help with Shortcodes
- How to put a form with php code into a variable or shortcode?
- Where is this function’s callback getting its arguments from?
- Unable to process php via shortcode
- Help with WordPress function inside a shortcode
- calling a custom field value inside functions.php
- Using ob_start and ob_get_clean with wordpress shortcode
- Short code template + ajax
- WordPress shortcode returns the data before
- List all blogs, but exclude the main site
- Shortcode to embed Edit Account form not working
- Shortcode not staying inside div tag
- Line breaks inside shortcode variable
- Handling PHP/HTML inside the output of a shortcode function
- Shortcode for Listing Users from Meta Value?
- Cant display an image via PHP in wordpress
- Shortcode to pull posts
- PHP code inside Shortcode
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Help Fallback (thumbnail)
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- Shortcode to log user into current URL
- 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?
- Split shortcodes to array of shortcodes
- Shortcodes showing in excerpt despite using strip_shortcodes
- PHP error with a shortcode: “no suitable wrapper” for file_get_contents
- PHP Helper Class to create shortcodes
- Calling PHP Titles inside Javascript Markup
- How to make a conditional statement within $output in shortcodes.php?
- help with custom shortcode that stopped working
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- Change Spaces to Dashes?
- Shortcode for a Series of Elevating Image Files, Excluding a Range?
- Shortcode won’t execute
- How to get my [shortcode] rendered on the home page, other pages are fine
- Including Custom fields within the_content
- What is the difference between Null vs Empty (Zero Length) string?
- Shortcode displaying at the top of the page [duplicate]
- Adding a Tag Parameter / Filter to My Shortcode
- AJAX function not working [closed]
- Can ‘Custom Field’ data be inserted into this Short Code?
- MySQL Query Returns Array () In Shortcode
- how to get sentence values from wordpress shortcode parameter?
- Why wp_remote_get() fetches certain web pages while it doesn’t work for my localhost?
- Show Featured Image Dimensions and size frontend with shortcode
- How to exclude labels from certain categories in a shortcode?
- How to pass username in affiliate link in wordpress website
- How to work Woocommerce pagination inside shortcode?
- How to get woocommerce orders with get_posts method in a shortcode
- Updating Metadata with Shortcode
- Counting number of posts in multiple (sub)categories using shortcode
- Set document title through shortcode plugin
- using shortcodes inside gravity forms
- How to Create custom block for displaying information in content section which act like shortcode
- Trying to call dynamic content into a 3rd party shortcode
- Display logged in user name and lastname on page
- Unable to display multiple parameters from url by javascript through shortcodes
- Create shortcode for metabox gallery
- Display Visual Composer shortcode if a post belongs in specific categories
- Shortcode in Shortcode/HTML Graphics and Pictures
- Why is the current page loaded in the pop-up window and not the specified one?
- is it possible for a URL to filter by tag
- How to search order using database frontend short code WordPress
- How do I reopen the (Popup Maker) after entering the correct password for a password protected page?