How to replace part of the autonav link with an image?
Permalink
I use autonav hadrcoded into the theme to display sidebar navigation.
I have multiple product pages that have names like "ProductName SOMETHING TECHNOLOGY Gadget".
How could I replace the "SOMETHING TECH" with a logo image?
It has to be autonav so that new links automatically appear if new product pages are created.
I'm using jordan's clean autonav template with minimal modifications.
I'm thinking about adding a loop somewhere that checks if the Page Name contains SOMETHING TECH, and if so, it outputs the Page Name with an image in place of S.T. instead of the page name, but I'm not sure how would I do this.
I'm open to any other suggestions, maybe there is an easier way to achieve this goal.
Thanks in advance.
I have multiple product pages that have names like "ProductName SOMETHING TECHNOLOGY Gadget".
How could I replace the "SOMETHING TECH" with a logo image?
It has to be autonav so that new links automatically appear if new product pages are created.
I'm using jordan's clean autonav template with minimal modifications.
I'm thinking about adding a loop somewhere that checks if the Page Name contains SOMETHING TECH, and if so, it outputs the Page Name with an image in place of S.T. instead of the page name, but I'm not sure how would I do this.
I'm open to any other suggestions, maybe there is an easier way to achieve this goal.
Thanks in advance.
I inserted the following:
Then changed
to
So it adds a class to the word, that can be easily replaced with an image via CSS.