Skip Navigation

[Closed] Shortcode

This support ticket is created 9 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 2 replies, has 3 voices.

Last updated by Caridad 9 years ago.

Assisted by: Adriano.


Can you please give me an example (using actual numbers - exactly how I should do it) of how to set a custom image size for a featured image in a view. Sorry i don't understand the instructions in the shortcode reference.

Can you also tell me how to add a caption to a featured image in a view - when i add this - [wpv-post-featured-image data="caption"] the image just vanishes completely



The code below is an example of a custom image size. You should paste it in functions.php of your theme:

add_image_size( 'custom-size', 220, 180 );

Then you could call the shortcode like this: [wpv-post-featured-image size=??custom-size?? raw=??false??]

There are some options you could use, you can find everything here:

About the data argument, it returns that: the caption. If the image does not have a caption, nothing is returned.

You should use the code below to achieve what you want:

[wpv-post-featured-image size="custom-size" attr="caption=teste" raw="false"]

You can use the size attributes to display one of the predefined image sizes:

[wpv-post-featured-image size="medium"]

Predefined image sizes are normally added by theme.
You can change the code in the theme or add your own:

Or you can try adding more predefined sizes with a plugin like:

As for the caption, here you have the documentation on captions:

This is how you would use it:

[caption width="300" caption="[wpv-post-featured-image data="caption"]"]
[wpv-post-featured-image size="medium"][/caption]

Please let me know if you are satisfied with my reply and any other questions you may have.


The topic ‘[Closed] Shortcode’ is closed to new replies.