• Resolved Stagger Lee

    (@stagger-lee)


    What is wrong with this shortcode ? I am using widgets shortcode to put some widgets inside custom sidebar not used anywhere, and call it with this shortcode [widget id=”text-28″].

    First accordion works Well but second not. It is not problem with only this specific widget shortcode. Tried to call WP native widgets with the_widget and same problem.

    – Accordion JS is called
    – Deleted all own CSS style, same problem.

    Also it is not possible to click on second accordion. behave as empty despite it shows content outside of the accordion-item wrapper.

    Both of called widgets are simple text widgets.

    [accordion autoclose=”true” openfirst=”false” clicktoclose=”true” scroll=”125″]
    [accordion-item id=”item-1″ title=”Test 1″]
    [widget id=”text-28″]
    [/accordion-item]
    [accordion-item id=”item-2″ title=”Test 2″]
    [widget id=”text-29″]
    [/accordion-item]
    [/accordion]

    https://wordpress.org/plugins/accordion-shortcodes/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Stagger Lee

    (@stagger-lee)

    Tested with gallery shortcode and it is OK.
    This is this plugin:
    https://wordpress.org/plugins/widget-shortcode/

    Thread Starter Stagger Lee

    (@stagger-lee)

    I am trying to put PHP code inside accordion shortcode, in a text widget with PHP code enabled. Tried even with this plugin, same problem.

    https://wordpress.org/plugins/shortcode-exec-php/

    Plugin Author philbuchanan

    (@philbuchanan)

    Can you provide a link for me to take a look?

    Thread Starter Stagger Lee

    (@stagger-lee)

    It is a localhost developing, sorry.

    – Disabled all plugins, same.
    – Tested with some default theme, same. As I can see, needs hell of work to replicate what I do in custom theme.
    – Removed theme jquery file, all theme JS scripts temporary, same.

    I have same results if I use 2 separate accordions with one accordion.

    So long I tried all this stuff and allways same results, second accordion shows content outside accordion.

    PHP code i tried inside accordion shortcodes:

    – the_widget
    – get_template_part
    – dynamic_sidebar
    – other shortodes

    First accordion behave OK, second shows content outside (as open but not really open) and not clickable. Despite I test with same content inside both accordions. Or very similar.

    Thread Starter Stagger Lee

    (@stagger-lee)

    I solved problem before I send last comment, but felt like you deserve detailed explanation.

    Anyway I am stupid. Lost 2 days on it. 🙂 Had multiple <?php wp_footer(); ?> on homepage.

    – I am making homepage of multiple mini-loops and custom mini archives. as those professional and expensive themes had.
    – Want mostly to keep Bootstrap columns and Bootstrap equal height goodness inside those mini-loops and reduce hours and days of work for responsive.
    – Completely forgot to delete/comment footer part in mini-loops.

    Thanks for reply.

    Plugin Author philbuchanan

    (@philbuchanan)

    Glad you got it working.

    Thread Starter Stagger Lee

    (@stagger-lee)

    Seems as it was not only that. Now I have only one footer on page and same problem. I am calling a custom made sidebar via shortcode. Sidebar has 2 widgets (Recent Comments native, Decent Comments widget)

    I tried also with simple text widget and little text inside.
    First widget allways push other widgets outside of second accordion.
    Tried to rearrange them and change places.

    Thread Starter Stagger Lee

    (@stagger-lee)

    Mini loops inherited also HTML from sidebar. Removing this and leaving naked PHP code in this sidebar file for mini loops template fixed problem.

    It is not easy to make all those fancy homepage templates commercial themes have. They are done by many persons and under long time. They sell them in thousands and can afford work like this.

    Want to say it is like playing chess, need to think many moves in forward.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘First accordion OK second NOT’ is closed to new replies.