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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -