Meyerweb,
@Meyerweb@mastodon.social avatar

New question: is there a way to get to show all the posts in a given query on a single page from the URL query string, without having to build a custom template for it, or otherwise modify template files on the server?

For example, something I could add to the end of the URL https://meyerweb.com/eric/thoughts/category/tech/grid/?order=asc in order to get all of my Grid posts on a single page that I could print or PDF-ize or just run through in a single scroll. I’ve reviewed the list of query vars and none seem applicable.

peterwilsoncc,
@peterwilsoncc@aus.social avatar

@Meyerweb The pagination parameters are all private so there isn't a way to do it without a plugin.

This allows you to add ?unlimited to the URL but limits it to site admins as the DB query isn't very efficient so you don't want it to be public.

https://gist.github.com/peterwilsoncc/03356677f2ce754234be517bb2f2aa15

artlung,
@artlung@xoxo.zone avatar

@Meyerweb Settings > Reading > Blog post show at most __ posts and define that maximum and so no, there's no way to do that. One ends up with a pagination solution one way or another. Whether a Plugin that overrides that top limit everywhere or for a category or tag or any date archive view. It can also be with a template override file (category-grid.php in your case) to override the limit others have mentioned. I am experimenting with an automatic lazy load on my own site lately and like it.

kraftner,
@kraftner@mastodon.social avatar

@Meyerweb No, this would be too much of a vector for a DOS attack, sorry.

iamdtms,
@iamdtms@mas.to avatar

@Meyerweb If you have a page to query all page posts, it would be a huge security issue. Hope not exists. #WordPress (v6.3.1)

matze,
@matze@dewp.space avatar

@iamdtms @Meyerweb What exactly would be the security issue here?

iamdtms,
@iamdtms@mas.to avatar

@matze Want a page content. Getting all. Nevermind.

matze,
@matze@dewp.space avatar

@iamdtms This still doesn’t sound security-related to me. Maybe not privacy-friendly, but that depends on the content available.

jsit,
@jsit@social.coop avatar

@Meyerweb I’ve tried showposts, numposts, numberposts, posts_per_page, all with values 0 or -1, and haven’t stumbled across anything that works. If anything worked it would expect it to be something like that.

otto42,
@otto42@fosstodon.org avatar

@Meyerweb what does your "grid posts" mean exactly? Is it just the category of grid? Have you tried adding num_posts to the query?

dogwonder,
@dogwonder@mastodon.social avatar

@Meyerweb I’ve done that with query strings but only via a custom template. I guess you might be able to do something via pre_get_posts and $_GET['foo'] as a function within functions.php

https://www.billerickson.net/customize-the-wordpress-query/

Meyerweb,
@Meyerweb@mastodon.social avatar

@dogwonder That would seem to involve template files on the server, which is what I said I wanted to avoid. Or did I misunderstand you?

dogwonder,
@dogwonder@mastodon.social avatar

@Meyerweb sorry yes, I see that after re-reading. I am not sure without amending the query via php somewhere if it’s possible.

kkarpieszuk,
@kkarpieszuk@pol.social avatar

@Meyerweb you can hook into 'init' action, check get cars and of it is what you expect, do what you want and exit() at the end.

In a similar way any downloader plugins work.

That's just one idea.

Meyerweb,
@Meyerweb@mastodon.social avatar

@kkarpieszuk Sorry, I don’t understand what you’re saying. Do you have an example you could share?

Edent,
@Edent@mastodon.social avatar

@Meyerweb I never found a way to do that. But, you can sort of cheat by adding /feed to the end to get an RSS feed.
But that'll depend on how many entries your feed is set up for.
https://meyerweb.com/eric/thoughts/category/tech/grid/feed?order=asc

dfmjr,

@Meyerweb I don’t know how via query string but the category and tag pages display the number of posts set on general->reading

  • All
  • Subscribed
  • Moderated
  • Favorites
  • wordpress
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines