the_content() in single-{post-type}.php problem

First of all, you shouldn’t use get_posts on your CPT archive – WP already creates a query and selects posts that should be display in there. So your archive-pjesma.php should look like this: <?php get_header(); ?> <?php while ( have_posts() ) : the_post(); ?> <h2><a href=”https://wordpress.stackexchange.com/questions/326484/<?php the_permalink(); ?>”><?php the_title(); ?></a></h2> <?php // the_content(); ?> <?php … Read more

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

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