June 10th, 2016 by admin
You need to create a web.config file in the root directory of your WordPress installation (the same directory as the .htaccess file), and add the following code in web.config: [xml] <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="wordpress" patternSyntax="Wildcard"> <match url="*"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php"/> […]
June 7th, 2016 by admin
There is two way to do this job First Locate and edit your themes functions.php file. This can either be done in the admin panel by navigating to you can find Appearance -> Editor -> Click on functions.php file or by directly editing the file which you can usually find under wp-content/themes/<theme name>/functions.php [php] function […]
June 6th, 2016 by admin
[php] <div class="col-md-12"> <div class="custom-heading02"> <h2>Trending Articles</h2> </div><!– .custom-heading02 end –> <?php function filter_where($where = ”) { //posts in the last 30 days $where .= " AND post_date > ‘" . date(‘Y-m-d’, strtotime(‘-30 days’)) . "’"; return $where; } add_filter(‘posts_where’, ‘filter_where’); query_posts(‘post_type=post&posts_per_page=10&orderby=comment_count&order=DESC’); while (have_posts()): the_post(); ?> <div class="col-md-6 col-sm-12"> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail( ‘medium’, […]
June 3rd, 2016 by admin
use this code for show Tag without comma [php] <div class="tagsContainer"> <?php if (get_the_tags()) :?> <p class="tags">Tags: <?php the_tags(”, ‘ ‘, ”); ?></p> <?php endif;?> </div> [/php] and use this code for show Tag without comma [php] <?php the_tags( ‘Tags: ‘, ‘, ‘, ‘ ‘ ); ?> [/php] Css class [css] .tagsContainer { margin: 20px […]
May 27th, 2016 by admin
In WordPress, all sub-menus have the class ‘sub-menu’. To change it to a custom class, add the following code in your functions.php file. [php] function change_submenu_class($menu) { $menu = preg_replace(‘/ class="sub-menu"/’,’/ class="myclass" /’,$menu); return $menu; } add_filter(‘wp_nav_menu’,’change_submenu_class’); [/php]