Okay
  Public Ticket #2204336
Small customisation question
Closed

Comments

  • riczito started the conversation

    Hi guys,

    My client has asked me if I can replace the Category Filters on the image gallery on this page with icons instead. Is this possible? I imagine that this will entail modifying the PHP file.

    Similarly, he has asked me to change the "Next/Previous" buttons on portfolio navigation with Arrows. I guess this too will require editing the PHP.

    Can you advise?

    Thanks, Ric

  •  675
    Neuron replied

    Hi Ric,

    Well, you need a bit Custom CSS on this one to add icons. https://prnt.sc/psrkxz

    #filters li:before {
      padding-right: 10px;
      font-family: "Font Awesome 5 Free"; 
      font-weight: 900; 
    } #filters li:nth-child(1):before {
      content: "\f007";
    } #filters li:nth-child(2):before {
      content: "\f1ea";
    } #filters li:nth-child(3):before {
      font-family: "Font Awesome 5 Brands";
      content: '\f099';
    }

    So, nth-child(1) represents the first list item and so on. To check icons: 

    https://fontawesome.com/icons

    2) In this you need a bit of Custom jQuery, first install the following plugin which will allow you to add custom scripts.

    https://wordpress.org/plugins/insert-headers-and-footers/

    So, in the following directory at: Settings > Insert Headers and Footer you add the following script.

    <script>
        jQuery(document).ready(function($) {
            $('.o-post-navigation__link.next .o-post-navigation__title').html('<i class="fa fa-next"></i>');
            $('.o-post-navigation__link.prev .o-post-navigation__title').html('<i class="fa fa-prev"></i>');
        });
    </script>

    Feel free to ask for anything you need.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • riczito replied

    Guys,

    Thanks for the amazing reply! I have integrated some Font Awesome Arrows instead of the Prev/Next navigation for the Portfolio. Works perfectly!

    However, regarding the filters, the client wanted me to use custom icons, probably PNG images, not Font Awesome icons. This is a site about classic Mini cars, and he wanted two icons for his two categories, icons that I am supposed to design. It would involve hiding the Category name, and replacing it with an image. I am in the process of advising that it probably isn't possible... unless you think you know a way? :)

    Anyhow, thanks once again for your support. With your help I've managed to come a long way in a short time. I am recommending Neuron to all my colleagues & friends. Fantastic!

    Thanks, Ric

  •  675
    Neuron replied

    Hi Ric,

    Good to know, feel free to ask for anything you needsmile.png

    Yes, of course. Simply remove the old CSS that I've send you in the last reply, because it's easier if you use only jQuery.

    <script>
        jQuery(document).ready(function($) {
            $('#filters li:nth-child(1) a').html('<img src="https://placehold.it/20x20">');
            $('#filters li:nth-child(2) a').html('<img src="https://placehold.it/20x20">');
            $('#filters li:nth-child(3) a').html('<img src="https://placehold.it/20x20">');
        });
    </script>

    Check inside .html('your_url'), it works easy, I would suggest you to use png images, that would work better on that casesmile.png

    Thank you for these kind words, feel free to ask for anything you need.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.