Conditional tag for wordpress archive first page only -


i’m trying place widget on first page of category archive using widget logic wordpress. able place widget in category archive using is_archive(‘category1’) places on archive pages, want widget appear of first archive page. how do this?

there query_var can access, 'paged', not set if there 1 page or contains number of current page

i cannot test right now, assume should work:

 //get current page number, default 1  $current_page = get_query_var('paged', 1);   if ($current_page == 1){      //your code  } 

Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -