Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Add Class to Shortcode

Featured Replies

Hi have a shortcode that looks like this

 

[column][/column]

 

Trying to add a class to a column like this:

 

[column class=orange-row-full][/column]

 

Does not work.......Is this achievable?

You'll need to edit your functions.php (or the file where your column shortcodes are defined).

 

Here's an example of one of my simpler shortcode functions:

 

function cryst4l_box( $atts, $content = null ) {
extract( shortcode_atts( array(
'class' => '',
), $atts ) );

return '<div class="u-box '.$class.'">' . do_shortcode($content) . '</div>';
}
add_shortcode('box', 'cryst4l_box');

 

You could add the highlighted parts to your function, or copy / paste it here and we'll be able to help.

Edited by teodora
Formatting

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.