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)