Next 10 posts data of currently viewing post in blog page

This will get you next 10 posts on single post template. <?php global $post; $current_post = $post; for ( $i = 1; $i <= 10; $i++ ) { $post = get_previous_post(); // this uses $post->ID setup_postdata($post); get_template_part( ‘content’, get_post_format() ); } $post = $current_post; // restore ?>

Limit article to 100 characters. Can’t use the_excerpt…

function get_custom_excerpt( $content, $link ){ $content = some_function_to_handle_html_tag(substr($content, 0, 100)); // EDIT: need to be customized with a regex for proper output $content .= ‘ <a href=”‘.$link.'”> more… </a>’; return $content; } function some_function_to_handle_html_tag(){ //a regex to check last occurance of html opening tag //append respective closing tag or strip the tag if broken e.g. … Read more

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