How to add nofollow to wp_nav_menu

As you can see above, the Advanced Menu Properties are hidden under the Screen Options pull down tab located in the upper-right corner of WordPress Dashboard. NOTE: Make sure that you are in the Menus screen: http://yoursite.com/wp-admin/nav-menus.php W.r.t your question, the Link Relationship (XFN) option is what you want “check”. Then the appropriate field will … Read more

Checking if there is an Image inserted – if not don’t display anything

Try the following code: <div class=”item active <?php // If image URL is empty, echo “hidden” echo (get_theme_mod(‘slider_one’, ”) == ” ? ‘hidden’ : ”); ?>”> <img class=”img-responsive” src=”https://wordpress.stackexchange.com/questions/217340/<?php echo esc_url( get_theme_mod(“slider_one’, ” ) ); ?>” alt=”Slider 1″> </div> Then use the following CSS: .hidden { display: none } What this will do is: If … Read more

How to add suggest plugin to theme?

TGM Plugin Activation is the most popular PHP library among WordPress theme developers to allows them to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces

How to add multiple custom widget areas

You have to register multiple areas: function new_sidebar_widget_init() { register_sidebar( array( ‘name’ => ‘new-sidebar’, ‘id’ => ‘new-sidebar’, ‘before_widget’ => ‘<div id=”new-sidebar”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ”, ‘after_title’ => ”, ) ); register_sidebar( array( ‘name’ => ‘new-sidebar-1’, ‘id’ => ‘new-sidebar-1’, ‘before_widget’ => ‘<div id=”new-sidebar”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ”, ‘after_title’ => ”, ) ); … Read more

Similar Posts – NO plugin

Put this in your single.php: $tags = wp_get_post_tags($post->ID); if ($tags) { $first_tag = $tags[0]->term_id; $args=array( ‘tag__in’ => array($first_tag), ‘post__not_in’ => array($post->ID), ‘showposts’=>4, ‘caller_get_posts’=>1 ); $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); // post content stuff here endwhile; wp_reset_query(); } }