How to display term in archive page?

Use wp_get_object_terms function to get any taxonomy you want, category, tag, state, etc. For example: $terms = wp_get_object_terms(get_the_ID(), ‘state’); $state = array_pop($terms); echo $state->name; This function is returning array of terms, so in case you only have one state, it will return array of one item in it.

Set order acs and no paging for archive page

You can use pre_get_posts in your functions file for this with the WP_Query order and orderby parameters. function alter_query( $query ) { if ( $query->is_archive() && $query->is_main_query() && !is_admin()) { $query->set( ‘posts_per_page’, 100 ); } } add_action( ‘pre_get_posts’, ‘alter_query’ );

Archive page if else not working for post_excerpt and post_content

Apart from the horribly format issues you also have a typo: <?php $my_excerpt = $item->post_excerpt; if ($my_excerpt){ echo Str::limit($my_excerpt, 120);} else $content = ($item->post_content);{ $contentexcerpt = substr($content, 0, 150); echo $contentexcerpt, ‘…’; } ?> These lines: else $content = ($item->post_content);{ should be: else { $content = ($item->post_content); The parser registered a single line of code … Read more

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