Assign a color

Forums › Forums › Search & Filter Pro › Assign a color

Viewing 10 posts – 1 through 10 (of 11 total)
  • Anonymous
    #186494

    Hi,

    I would like to assign a color to <h2> and <button> on page https://tourismequestre-auvergnerhonealpes.fr/itineraires-auvergne-rhonealpes/ according to a taxonomy term “Départements”.
    For example, I would like Ain display results <h2> and <button> in orange, Allier in blue, …

    How to do this ?

    Best regards,

    Karine

    Trevor
    #186550

    Are you able to make a visual representation of what you need, or maybe an annotated screenshot? You would need to provide me a link to any images you make, as they cannot be uploaded here.

    Anonymous
    #186561

    Hi,

    Thanks for your response.
    I want this result : https://tourismequestre-auvergnerhonealpes.fr/images/results.jpg on my page results.php
    Color of title and button according to taxonomy term “Tous les départements”

    Thanks,

    Karine

    Trevor
    #186565

    Hi, does each post only ever have one taxonomy department, and if it does, it would require custom coding of the results.php being used to output the taxonomy term in the h2 and bloc-consult div. And then use custom css to add the colors to relate to these.

    Anonymous
    #186571

    Each post only ever have one taxonomy department. Can you help me with this custom coding of results.php ?

    Thanks.

    Trevor
    #186575
    This reply has been marked as private.
    Anonymous
    #186580
    This reply has been marked as private.
    Trevor
    #186584

    OK, if you now inspect the output results HTML, you will see the H2 and the bloc-consult div has class to identify the department, for example:

    <h2 class="departement-itineraires-dep-ain "><a href="https://tourismequestre-auvergnerhonealpes.fr/itineraires/boucle-cormaranche-2/">Boucle Cormaranche</a></h2>
      <div class="bloc_consult departement-itineraires-dep-ain "> etc.

    You must use these classes to change the colors as you want.

    Anonymous
    #186588
    Trevor
    #186592

    I have fixed it now.

Viewing 10 posts – 1 through 10 (of 11 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.