Skip Navigation

[Closed] view shortcode with custom parameter problem in block editor

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.

This topic contains 3 replies, has 2 voices.

Last updated by Christopher Amirian 1 year, 7 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2585803
Screenshot 2023-04-03 at 5.45.54 PM.png
Screenshot 2023-04-03 at 5.45.48 PM.png

Dear Sir/Madam,

Please refer to the screenshots, don't know why the view shortcode broken in block editor.

I show you in code and visual editor for your reference.

#2585915

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Would you please use the Shortcode block and for testing add this code instead?

[wpv-view name="procurement-flows" centerid="2"]

So basically I changed ' to " and removed the shortcode inside shortcode thing. See if it works?

To make Toolset shortcodes understand the nested shortcodes you need to go to Dashboard-> Toolset-> Settings-> Front-end Content and add the shortcode you want to nest there.

Thanks.

#2586703
Screenshot 2023-04-04 at 7.12.45 PM.png
Screenshot 2023-04-04 at 7.12.33 PM.png
Screenshot 2023-04-04 at 7.07.00 PM.png

Dear Christopher Amirian,

There is no problem if you use the shortcode block with the id number, as my centerid will be returned according to the current login user like

function func_centerid() {
	return get_user_meta(get_current_user_id(), 'wpcf-user-center', true);
}
add_shortcode('centerid', 'func_centerid');

I did add the nested shortcodes in Dashboard-> Toolset-> Settings-> Front-end Content

center id wpcf-user-center is a user custom field

#2586839

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thank you. Would you please update Toolset Types and Blocks to the latest version?

- IMPORTANT STEP! Create a backup of your website.
- Go to "WordPress Dashboard > Plugins > Add new > Commercial (tab)".
- Click the "Check for Updates" button.
- Update Toolset and its addons there.

See if it fixes the issue. If not, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Also please tell me which page to check.

Thanks.

The topic ‘[Closed] view shortcode with custom parameter problem in block editor’ is closed to new replies.