Taxonomy Category Icon on index page

Since you want the icons to appear in a specific place, this seems more like theme territory rather than plugin. One way to achieve your goal: Create a child theme (or edit the one you’re already using). Copy your homepage template (it’s unlikely you want to change index.php; you’re probably looking for front-page.php or home.php, … Read more

Hide icon and rating when there is no rating entered

Simply check that the rating is not empty before printing the markup you wish to make conditional: <?php $rating = get_average_listing_rating( $post->ID, 1 ); if ( ! empty( $rating ) ) { ?> <span class=”js-average-rating”><i class=”star”></i> <?php echo $rating; ?></span> <?php } ?> Without seeing this in context, it’s possible you need the outer span … Read more

Expected an identifier and instead saw ‘

If you use JSX in your code, then you need to build the script before using it on “standard” WordPress sites where JSX is not available. So, Either build the script.. Or (looking at your code, it’s probably easier to just) use (ES5 with) wp.element.createElement() and not JSX: var MyIcon = function () { var … Read more

Swap SVG icons in child themes

I see that both icon arrays ($ui_icons and $social_icons) in Twenty Nineteen can be accessed publicly, so I managed to replace any icon via the init hook in a child theme. An example: function child_init() { TwentyNineteen_SVG_Icons::$social_icons[‘instagram’] = ‘<svg>… Insert new Instagram icon SVG code here …</svg>’; } add_action( ‘init’, ‘child_init’ );

SVG icons in Twenty Nineteen

You shouldn’t need to change the viewbox attribute. You can probably just use it. The way I think about is SVGs are like they are drawn on graph paper. The viewbox sets out how many squares there are on the paper and the the path in your examples above are the guides to where to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)