• Resolved perlmunger

    (@perlmunger)


    I am using Connections Business Directory inside of an accordion plugin, but the drop down won’t display. Here’s is a stand alone page where it works fine:

    https://galenstgskd.wpengine.com/find-a-rep/

    But when I copy the short code, [connections show_category_count=’TRUE’ category=57 show_empty_categories=’TRUE’], from there, to the second accordion section here called “Find a Representative”: https://galenstgskd.wpengine.com/contact/ , It won’t show me the drop down.

    When I remove the category=57 from the shortcode, it loads all of the connections, so it seems like it’s parsing the shortcode, but I need the drop down to display so that users can drill down to the connection they’re looking for.

    Any ideas? Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    The dropdown is in the accordion, but it is very, very thin. The issue is the accordion content has a zero width when hidden. The third-party library that calculates the width of the dropdown bases the width on the display width and since it has none, it is basically set at a zero width.

    Sorry but there are two solutions. do not place it in an accordion or, if the accordion has the option, set it to the open state by default.

    I hope this helps, please let me know.

    Thread Starter perlmunger

    (@perlmunger)

    Hi Steven,

    Thanks for the feedback. I appreciate it. I see what you’re saying.

    I have done what you’ve suggested and placed it into an accordion section that is open on page load. This works, but because the section is not first on the page, the category drop down selector on-change, reloads the page and you see the first accordion section and have to scroll to see the connections listing results.

    Is there a way to specify an ID in the on change so that when the page loads up again it can jump to that position on the page?

    Again you can see what I mean here: https://galenstgskd.wpengine.com/contact/

    Thanks again

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Use the Code Snippets plugin to add the following code snippet:

    $callback = static function( $permalink ) {

    if ( is_admin() ) {
    return $permalink;
    }

    return "{$permalink}#cn-list";
    };

    add_filter(
    'Connections_Directory/Template/Partial/Search/Form_Action',
    $callback
    );

    add_filter(
    'Connections_Directory/Widget_Pack/Widget/Search/Form_Action',
    $callback
    );
    add_filter(
    'cn_permalink',
    static function( $permalink, $atts ) {

    if ( array_key_exists( 'type', $atts ) && 'category-taxonomy-term' === $atts['type'] && ! is_admin() ) {
    return "{$permalink}#cn-list";
    }

    return $permalink;
    },
    10,
    2
    );
    add_filter(
    'cn_pagination_links_args',
    static function( $args ) {

    $args['add_fragment'] = '#cn-list';
    return $args;
    }
    );

    I hope this helps, please let me know.

    Thread Starter perlmunger

    (@perlmunger)

    Hey Steven,

    Thanks for your feedback. I really appreciate it. Our client decided they wanted to break everything out into separate pages, so we didn’t end up needing jump links.

    Thanks again.

    -Matt

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.