WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #39666, comment 12


Ignore:
Timestamp:
04/15/2018 03:26:14 PM (15 months ago)
Author:
birgire
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #39666, comment 12

    v1 v2  
    55But I think the "sticky" approach on the front-end can be rather confusing regarding the pagination (just as you mention). For example if one sets the posts per page as 2 and then 4 can be displayed on the first page. Similar for the possible sticky posts duplication.
    66
    7 Otherwise, if the sticky admin posts approach is taken, then they could be pre-pended to the resulting posts array, on the first page, with a secondary query? There might be ways to avoid the extra query, by checking if all static pages are already displayed on the first page (similar to your patch in [attachment:39666.patch] ). Further one could restrict it to the {{{page}}} post type, to avoid running extra queries on all post list tables, but there might be tickets to expand static pages to custom post types? Maybe implement this via filter, to avoid modifying the list table too much, as it might be used by plugins.
     7Otherwise, if the sticky admin posts approach is taken, then they could be pre-pended to the resulting posts array, on the first page, with a secondary query? There might be ways to avoid the extra query, by checking if all static pages are already displayed on the first page (similar to your patch in [attachment:39666.patch] ). Further one could restrict it to the {{{page}}} post type, to avoid running extra queries on all post list tables, but there might be tickets to expand static pages to custom post types? Maybe implement this via filter, to avoid modifying the list table class too much, as it might be used by plugins.
    88
    99