Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same to me.

    WordPress 4.2.2
    php 5.5.16
    Error reporting 32767

    Thread Starter filchos

    (@filchos)

    Thank you for your explanations, bcworkz!

    Now I understand better twice: How it works and how awkward WordPress’ internals are.

    Thread Starter filchos

    (@filchos)

    Thank you for your help, bcworkz!

    Sometimes WordPress is hard to understand since it’s kind of quaint sometimes.

    Just one case:

    query_vars of the current main loop contain both name and pagename without any problem in the main loop.

    If I set these vars in the constructor of an own request I would expect the same result. But post_type will be set to post instead. Only when I remove the name var it works as excepted. I had similar cases with the vars p and page_id causing the same problem.

    What I don’t understand: The main loop uses a Wp_Query instance as well (the global wp_query), but when I try to mimic the behaviour by constructing a Wp_Query instance that looks alike to me I get a different behaviour. Somehow the main loop must have another initialisation process as my code, but I didn’t find a clue, neither in the WordPress documentation, nor by checking the code itself.

    There are heaps of loop and Wp_Query related functions and methods initialising, setting up, building objects, destroy object, reset the pointer and so one but I didn’t come up to a working combination.

Viewing 3 replies - 1 through 3 (of 3 total)