Show content based on page number

Current post page can be detected using get_query_var(‘page’);. note that if you do not pass any page the page 1 is shown, but get_query_var(‘page’); will be 0; So in your function.php you can add: function get_page_image() { global $post; if ( ! is_object($post) || ! isset($post->ID) ) return; $page = get_query_var(‘page’); if ( empty($page) ) … Read more

post_class not working with css

First of all, <?php post_class(); ?> function prints a string that contains html ‘class’ attribute. So, whenever you are using this function inside class attribute, then you are actually printing another class attribute inside class attribute. That’s why your class is not working. Secondly, since <?php the_content(); ?> function may contains <p> tag, that’s why … Read more

the_content of template page

Have you tried using the whole loop? <?php $loop = new WP_Query(); if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); ?> <!– before –> <?php the_content(); ?> <!– after –> <?php endwhile; else: ?> <p><?php _e( ‘Nope. Doesn\’t exist’ ); ?></p> <?php endif; ?>

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