• Resolved ameo02

    (@ameo02)


    Hi!

    I’m using DOCTYPE Theme:

    which has nice widget Call To Action.
    It’s full name is Section:Call To Action.

    Since I want to use it in a post / page
    I added this to Widgets for Shortcodes.

    My problems is, I can’t get it to display.
    What should it’s shortcode be, can you tell me?

    Here is debug if that helps you to find out:

    result of wp_get_sidebars_widgets():
    
    wp_inactive_widgetsarray(2) { [0]=> string(20) "woothemes_features-2" [1]=> string(27) "master-slider-main-widget-2" }
    sidebar-footerarray(5) { [0]=> string(8) "search-2" [1]=> string(14) "recent-posts-2" [2]=> string(20) "woothemes_features-2" [3]=> string(27) "master-slider-main-widget-2" [4]=> string(17) "stag_widget_cta-2" }
    sidebar-homepagearray(4) { [0]=> string(27) "master-slider-main-widget-3" [1]=> string(14) "recent-posts-2" [2]=> string(10) "calendar-2" [3]=> string(8) "search-2" }
    widgets_for_shortcodesarray(1) { [0]=> string(17) "stag_widget_cta-3" }
    $_wp_sidebars_widgets:
    
    array(5) { ["wp_inactive_widgets"]=> array(2) { [0]=> string(20) "woothemes_features-2" [1]=> string(27) "master-slider-main-widget-2" } ["sidebar-footer"]=> array(5) { [0]=> string(8) "search-2" [1]=> string(14) "recent-posts-2" [2]=> string(20) "woothemes_features-2" [3]=> string(27) "master-slider-main-widget-2" [4]=> string(17) "stag_widget_cta-2" } ["sidebar-homepage"]=> array(4) { [0]=> string(27) "master-slider-main-widget-3" [1]=> string(14) "recent-posts-2" [2]=> string(10) "calendar-2" [3]=> string(8) "search-2" } ["widgets_for_shortcodes"]=> array(1) { [0]=> string(17) "stag_widget_cta-3" } ["array_version"]=> int(3) }
    $wp_registered_sidebars:
    
    array(3) { ["sidebar-footer"]=> array(8) { ["name"]=> string(14) "Footer Widgets" ["id"]=> string(14) "sidebar-footer" ["description"]=> string(20) "Footer Widgets Area." ["class"]=> string(0) "" ["before_widget"]=> string(44) "
    " ["after_widget"]=> string(8) "
    " ["before_title"]=> string(31) "
    " ["after_title"]=> string(12) "
    
    " } ["sidebar-homepage"]=> array(8) { ["name"]=> string(17) "Homepage Sections" ["id"]=> string(16) "sidebar-homepage" ["description"]=> string(50) "Here you can configure the layout of the Homepage." ["class"]=> string(0) "" ["before_widget"]=> string(69) "
    " ["after_widget"]=> string(16) "
    " ["before_title"]=> string(26) "
    " ["AFTER_TITLE"]=> STRING(5) "
    
    " } ["widgets_for_shortcodes"]=> array(8) { ["name"]=> string(22) "Widgets for Shortcodes" ["id"]=> string(22) "widgets_for_shortcodes" ["description"]=> string(155) "Sidebar to hold widgets and their settings. These widgets will be used in a shortcode. This sidebars widgets should be saved with your theme settings now." ["class"]=> string(0) "" ["before_widget"]=> string(44) "
    " ["after_widget"]=> string(8) "
    " ["before_title"]=> string(31) "
    " ["after_title"]=> string(12) "
    
    " } }

    https://wordpress.org/plugins/amr-shortcode-any-widget/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author anmari

    (@anmari)

    Hi, I don’t think I can explain any better than is already explained here
    https://wordpress.org/plugins/amr-shortcode-any-widget/installation/

    Did you read it ?

    If you want to use the id, it looks like it might be
    stag_widget_cta-3

    so
    [do_widget id=”stag_widget_cta-3″]

    or possibly
    [do_widget “Section:Call To Action”]

    Thread Starter ameo02

    (@ameo02)

    I’ve put number 2 in ID of widget, because in source code there is no mention of number 3

    [do_widget id=”stag_widget_cta-2″]

    but you’ve put number 3

    [do_widget id=”stag_widget_cta-3″]

    and that’s how it works, but I don’t understand why it’s 3 instead of 2.

    so that fixed my problem of displaying it.
    Thank You for your help

    however, it’s not all over the page, but it’s like 1 fifth of it,
    I’m not sure why. That’s not plugin issue, tho.

    Plugin Author anmari

    (@anmari)

    It’s ‘3’ because if you look at the sidebar/widget info dumped – round about line 5/6, inside the “widgets_for_shortcodes”, there is your widget id

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘What should my shortcode look like?’ is closed to new replies.