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.
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.
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