Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Forum: Fixing WordPress
    In reply to: Add svg to wp menu
    Thread Starter arrrg…

    (@arrrg)

    I’ll probably have to do that for now. I don’t know enough php to create a menu walker that can deal with this ??

    Forum: Fixing WordPress
    In reply to: Add svg to wp menu
    Thread Starter arrrg…

    (@arrrg)

    I think that would mean using an image file like jpg or png. I want to add it as an icon font using this in my css.

    @font-face {
    	font-family: 'IcoMoonRegular';
    	src: url('icomoon-webfont.eot');
    	src: url('icomoon-webfont.eot?#iefix') format('embedded-opentype'),
    		url('icomoon-webfont.woff') format('woff'),
    		url('icomoon-webfont.ttf') format('truetype'),
    		url('icomoon.svg#IcoMoon') format('svg');
    	font-weight: normal;
    	font-style: normal;
    }
    .icon-b:before, .icon-a:after {
    	font-family: 'IcoMoonRegular';
    	content: attr(data-icon);
    }

    then calling it in html with
    <p class="icon-b" data-icon="?"><a href="#">Home</a></p>

    The data-icon attribute gets filled with which ever snippet of code relates to that icon in your svg font.

    this isn’t too difficult i’m just stumped as to applying it to a wp_menu

    Thread Starter arrrg…

    (@arrrg)

    vtxyzzy you are brilliant! It was just a matter of making the changes in the loop.php file. so i will make a custom loop file now like you suggested. excellent, you are excellent ??

Viewing 3 replies - 1 through 3 (of 3 total)