Where do I insert   to? [closed]

Classes can be added to the ‘li’ tag of each menu item. This field is hidden by default. To show the classes field, navigate to Appearance > Menus. Then click the Screen Options tab at the top the screen. Click the checkbox next to CSS Classes. When specifying class names it is not necessary to … Read more

How to filter homepage posts by popularity? [closed]

First thing we need to do is create a function that will detect post views count and store it as a custom field for each post. To do this, paste the following codes in your theme’s functions.php file function wpb_set_post_views($postID) { $count_key = ‘wpb_post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”){ $count = 0; delete_post_meta($postID, $count_key); … Read more

Custom post type / Filter by letter

Assuming that you have a query result, ordered by your titles ASC and wrapped each “block” in a div with the id=”A”, etc.: There’s a PHP function to fill arrays: $aToZ = range( ‘A’, ‘Z’ ); Then you can loop through it: echo ‘<ul class=”aToZ-list”>’; foreach ( $aToZ as $char ) echo “<li class=”aToZ-el”><a href=”#{$char}” … Read more