Reputation
Top tag
Next privilege 100 Rep.
Edit community wikis
Badges
13
Impact
~13k people reached

  • 0 posts edited
  • 0 helpful flags
  • 10 votes cast
Apr
13
awarded  Popular Question
Feb
22
comment Improving WP_Query for performance when random posts are ordered
I have a while statement, but I'll show you in a different question. Thanks mate, appreciated.
Feb
22
comment Improving WP_Query for performance when random posts are ordered
I get it, thank you very much. I will probably ask a new question about how to change my WP_Query to this pre_get_posts query. I appreciate this, merci. And yes, you are right about depriving myself (and others) by asking question in comments.
Feb
22
comment Improving WP_Query for performance when random posts are ordered
I get it. Thank you! Last question: how should I use pre_get_posts? Is it an additional function where my WP_Query has to stay like it is or do I have to change that as well?
Feb
22
comment Improving WP_Query for performance when random posts are ordered
It isn't slowing it down very much, but I read that WP Query by defaults adds 5 queries in comparison to query_posts for example. So I assumed that this could be done quicker. Thanks for your post btw, I will check that out as well.
Feb
22
comment Improving WP_Query for performance when random posts are ordered
Thanks man. I appreciate that thought. Have to it with PHP, for now, though.
Feb
22
revised Improving WP_Query for performance when random posts are ordered
added 397 characters in body
Feb
22
comment Improving WP_Query for performance when random posts are ordered
Actually you convinced me to use pre_get_posts, but I don't get the logic. Does my WP_Query have to stay the same? Or do I have to add something to functions.php and remove my WP_Query fully?
Feb
22
comment Improving WP_Query for performance when random posts are ordered
Hmm, interesting. Thanks for the answer, but it does not answer my questions... I get it that it's even better to avoid WP_Query and use something else instead, but what about the array question? How can I optimize the code I have beside changing WP_Query? And once again: I get your point, but I need a different answer for this one.
Feb
22
asked Improving WP_Query for performance when random posts are ordered
Feb
21
accepted How to remove /page/2/ from home page?
Feb
21
comment How to remove /page/2/ from home page?
I get it. Thanks mate.
Feb
21
comment How to remove /page/2/ from home page?
The code snippet does not work indeed. But I don't get your explanation... so if I use a static front page, than it's impossible to have pagination? And what does this main query alter function do to be precise?
Feb
10
comment How to remove /page/2/ from home page?
Thanks man. I will check this out and let you guys know. Appreciated.
Feb
10
comment How to remove /page/2/ from home page?
So, because I set "display posts on homepage", it automatically thinks I need pagination and adds it? So, I need to make a static front page with a WP query, correct? And then, the problem will be fixed?
Feb
10
comment How to remove /page/2/ from home page?
That's the whole problem @Milo: there is nothing that generates pagination. Nothing in my template at all... That's why I asked this question.
Feb
10
comment How to remove /page/2/ from home page?
@denis.stoyanov, no, cause it's the exact same as on my front-page. I don't use images.
Feb
10
comment How to remove /page/2/ from home page?
And what if I wouldn't do that? I mean, I will consider it for sure... but will that solve my problem? And isn't there any other way to solve this? @Milo
Feb
10
comment How to remove /page/2/ from home page?
CAI, thanks, will change that one. @Milo what do you suggest in that case?
Feb
10
comment How to remove /page/2/ from home page?
Well, I do have a link that links to a page where you can see the other posts, but that one links to a different page (different URL).... and thus, it's not that one. Besides, when I go to the page/2/ url, it just gets my home page, it's not a pagination at all, it seems.