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

Show ACF value on Seach result?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Show ACF value on Seach result?

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #20413
    gianghl1983gianghl1983
    Participant

    Hi,

    How can I show ACF value on search drop down result on each item (Price, Number of Rooms….)

    Thank you!

    #20419
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    By using the advanced title and content fields.

    #20446
    gianghl1983gianghl1983
    Participant

    Found it, thank you!

    #20447
    gianghl1983gianghl1983
    Participant

    Is there any way to CSS diferently Search Result for Mobile/PC?

    I also want to display result differently by CSS on small Search Form..:D

    Thank you!

    • This reply was modified 7 years, 5 months ago by gianghl1983gianghl1983.
    #20451
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    With CSS media queries it could be possible to some level. It depends on what exactly do you want to change. Let me know, and I might be able to suggest a set of custom CSS rules to help you out.

    #20452
    gianghl1983gianghl1983
    Participant

    Thanks! But Media Query I dont think will work in this case.

    I have 2 search form (Same search form) for Header (Long form) and Sticky Header (Short form). I want to CSS result differently for both form.

    E.e: I want to display my Price Value Inline-block in long form but Block in Short…

    Thank you!

    #20455
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I think that’s doable. Just wrap the price value within a span element (or anything you need) with a class in the advanced title field, so it’s easily targetable, something like:

    <span class='my_price_val'>{your_price_field_here}</span>

    Then CSS with media queries:

    /* Desktop default*/
    .asp_r  span.my_price_val {
        display: block;
    }
    
    /* Devices below 720px */
    @media screen and (max-width: 720px) {
        .asp_r  span.my_price_val {
            display: inline-block;
        }
    }

    This is how I would do it.

    #20456
    gianghl1983gianghl1983
    Participant

    No, actually this is the same screen. One search form display in sticky header(Width reduced) and one form in normal header (width long)

    I want to target those form on the PC, not form in different view screens (PC/Mobile)

    Thanks!

    #20462
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Well, I am not sure if this is possible then. Maybe using a custom script + CSS in some way, but might not be possible. If you want, you can include a link where I can see this, and might be able to suggest something.

    #20470
    gianghl1983gianghl1983
    Participant

    My site: https://raovat24s.vn/

    To see a short search form please scroll down.

    Thank you!

    #20487
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    Thank you, it turns out those are two separate outputs, and luckily the plugin automatically marks each instance from the same shortcode with a number, so custom CSS will work.

    To target elements within the ‘small’ search, use the .asp_r_2_1 parent class, like so:

    .asp_r_2_1 .your_target_class {
       /* code here */
    }

    This will target the .your_target_class within the small search only.

    #20495
    gianghl1983gianghl1983
    Participant

    Great! Thank you for rescure me, lol!

    Have a nice day!

    #20497
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #20498
    gianghl1983gianghl1983
    Participant

    Sure, thank you ;)!

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Show ACF value on Seach result?’ is closed to new replies.