-
bennyuk2
Hi,
1. Can i display a sidebar widget in a page content area?2. Can I wrap a sidebar widget within a shortcode?
eg if I have a custom shortcode that only displays to logged in user from france call [showtousers region=france]content here[/showtousers]Many thanks
Ben -
Hi Ben,
Just to be sure we guide you the right way:
- When you say “display a sidebar widget in a page content area,” do you mean you’d like to take an existing widget from Appearance → Widgets and place it inside the content editor of a page?
- For the shortcode example, do you want the entire widget output to be wrapped inside your shortcode, so it only shows for certain users/regions?
-
bennyuk2
Hi Chaz,
Correct on all counts.
1. YES, Can I display a widget from Appearance → Widgets and place it inside the content editor of a page
2. YES, the entire widget output to be wrapped inside your shortcode, so it only shows for certain users/regionsThanks
Ben -
1. YES, Can I display a widget from Appearance → Widgets and place it inside the content editor of a page
It depends on whether this widget offers blocks. If so, then yes, you can add the block to the content area. If the widget is from 3rd party plugin, you will need to check with the plugin’s support.
2. YES, the entire widget output to be wrapped inside your shortcode, so it only shows for certain users/regions
I don’t think so, unless you know how the widget is coded, so you can add the code into your shortcode code.
- You must be logged in to reply to this topic.