Background color from Custom PostType

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Background color from Custom PostType

This topic contains 9 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 months, 2 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #46767
    phofstetter
    phofstetter
    Participant

    Hello Support

    I created a custom posttype using crocoblock’s JetEngine. We have a field defining a color value . Example: #afafaf.
    How can we add a background color in the Ajax Search Result PopUp?

    Frontent Testpage Url: https://www.staging2.kalkmaster.ch/wasserhaerte-test/
    You can use Zip or City like: 3000 or Bern

    Backend: Testpage Url: https://www.staging2.kalkmaster.ch/wp-admin/post.php?post=43447&action=elementor
    Login as mentioned above.

    Attachments:
    You must be logged in to view attached files.
    #46773
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details.

    So I see the box HTML is actually populated there, but there is a custom CSS rule that overrides all the colors: https://i.imgur.com/JeM7LEI.png

    This:

    .box {
        text-align: center!important;
        background-color: #0000003b!important;
    }

    Removing the color rule from that will resolve the issue.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #46775
    phofstetter
    phofstetter
    Participant

    Hi

    Thank you for the clue.
    I deleted the CSS overriding. But the background color still is not the correct one we use in the PostType

    Example: Rovello has the background color set to #FF6600
    The background color displayed is fixed to #FFA500. The background should change depending on the value of the post.

    Attachments:
    You must be logged in to view attached files.
    #46778
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    The plugin populates whatever wordpress returns, so it looks like the colors are set that way or modified later on during the execution or via CSS files via different rules.

    Note that the live results list is not the same as the singular posts or the loop page.

    You could however try to reconstruct the same layout via these settings and a custom description field: https://i.imgur.com/FckWRc8.png
    Custom description field value:
    <div class="box" style="background-color:{bg-farbe}">{descriptionfield}</div>

    Please note that this is beyond regular support (customization), so I can’t guarantee anything, but this should be very close to what you need.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #46779
    phofstetter
    phofstetter
    Participant

    Hi

    Great. Works now . Thank you for the pointing me to this.

    One question left. I see in the html code two box definitions. How can i also change the first box definition in the div-tag to the dynamic background value also?

    Attachments:
    You must be logged in to view attached files.
    #46782
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You must have a custom hook that is adding the color, that wrapper element is not coming from the search bar.
    From what I see it’s coming from this file: https://www.staging2.kalkmaster.ch/wp-admin/theme-editor.php?file=functions%2Fsearch.php&theme=boutique

    It looks like it was trying to do the same thing but in a much more complicated manner.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #46786
    phofstetter
    phofstetter
    Participant

    You are absolutely great!
    Thank you. I am impressed about your support.

    Best regards. Philipp

    #46787
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #46788
    phofstetter
    phofstetter
    Participant

    Shure i will do

    #46789
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.