php - Strange pagination behavior giving white page -
I am using points on wordpress page I have used this code on my other pages and it is working fine there, but on the "schedule" on this page, when I try to link the next page of Goto it gives a white page.
I reset the permalink setting because I found the only solution on the Internet, there is still no such problem.
In the database, there are 9 records in this custom post type, so the page number will be 3 pages.
Pagination on the page in pagination.php I hate to answer my question but yes I found the solution problem custom post The type slug was with "schedule", the same page had the same slug as "schedule", I think it was conflicting, okay I do not think it should, but anyway.
& lt ;? Php $ paged = (get_query_var ('page'))? Get_query_var ('page'): 1; $ Args = array ('post_type' = & gt; 'schedules', 'posts_per_page' => 3, 'post_status' = & gt; 'publish', 'paged' = & gt; $ paged); query_posts ($ args); If (is_pause ()): while (is_pause ()): the_post (); $ Schedules_vessel = get_field ('schedules_vessel'); $ Schedules_voyage = get_field ('schedule_wies'); $ Schedules_port = get_field ('schedules_port'); $ Targets_country = get_field ('time table'); $ Schedule_group = gate_field ('schedules_arvar'); $ Schedule_depetirer = gate_field ('schedule_deepter'); $ Date = DateTime :: Creation formform ('D / M / YH: IA', $ schedule_agment); $ Schedule_ext_data = $ date- & gt; Format ('dm y'); $ Schedules_arrival_time = $ date- & gt; Format ('g: i'); $ Date = datetime :: vsproformat ('D / M / YH: IA', $ schedule_deepter); $ Schedule_departmentrade_data = $ date- & gt; Format ('dm y'); $ Schedules_departure_time = $ date- & gt; Format ('g: i'); ? & Gt; & Lt ;? Php timeline; end if; ? & Gt; & Lt ;? Php require_once (get_template_directory (). "/snippets/pagination.php"); ? & Gt;
& lt; Php global $ wp_query; $ temp = ""; $ Big = 99 99 99 99 9; Echo paginate_links ('base' = & gt; str_replace ($ big, '% #%', esc_url (get_pagenum_link ($ big)), 'format' = & gt; 'paged =% #%', 'current' = & Gt; Maximum (1, get_query_var ('paged'), 'total' => $ wp_query-> max_num_pages, 'prev_text' = & gt; 'previous',' next_text '= & gt;' next ',' Type '= & gt;' list ')); ? & Gt; & Lt ;? Php $ wp_query = null; $ Wp_query = $ temp; wp_reset_query (); ? & Gt;
Comments
Post a Comment