This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Search field no longer stretches to 100% width #36227
    philip29philip29
    Participant

    Happy to help sort it out. Thanks for the assist and for the great plugin

    in reply to: Search field no longer stretches to 100% width #36217
    philip29philip29
    Participant

    I think we may have stumbled onto the cause.

    We have four ASP searches. Two are constrained to 200px width. Two were set to default width (no width specified) which resulted in 100% width. Before the recent ASP updates, the widths of the different ASP searches were respected. After the update, the width of the 200px search appears to have been set globally via .asp_w_container{width:200px}, causing all four ASP searches to be constrained to 200px.

    I’m guessing the old code properly constrained the CSS settings to each ASP search, but the new code inadvertently broke the constraints. The way to test would be to create a site/page with multiple searches, set to different sizes.

    in reply to: Search field no longer stretches to 100% width #36216
    philip29philip29
    Participant

    Hello. Sorry for the late follow up, and happy new year.

    Digging further into the code, the issue is definitely caused by ASP generating a CSS class:
    .asp_w_container{width:200px}

    Inspecting the elements in Chrome reveals the normal 100% width is being overridden by this CSS statement.

    We don’t have any ASP search fields set to that dimension, and the search field used to be fine prior to 4.21.7, so there must be something going on in ASP.

    For now we have resolved the issue by adding custom CSS via the ASP Custom CSS field:
    .asp_w_container { width: 100%!important; }

    Thanks

    • This reply was modified 4 years, 4 months ago by philip29philip29.
    in reply to: Filter search results based on authentication status #29040
    philip29philip29
    Participant

    Thank you, Ernest. Unfortunately it is still not working. I believe I’ve found a different way to address the issue: multiple ASP search forms, each with different constraints and conditionally displayed based on login status.

    in reply to: Filter search results based on authentication status #29018
    philip29philip29
    Participant

    He Ernest

    MemberPress support suggested trying MeprRule::is_locked($r)

    function asp_fix_groups_exclusions($results) {
    	// Group based exclusions
    	if ( class_exists('MeprRule') ) {
    		foreach ($results as $k => &$r) {
    			if ( isset($r->post_type) && MeprRule::is_locked($r) )
    				unset($results[$k]);
    		}
    	}
    	return $results;
    }
    add_filter('asp_results', 'asp_fix_groups_exclusions', 10, 1);

    This had no effect, all results were returned to all users. Do you see any issues with the code? This was placed in a child theme’s functions.php.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)