I am currently testing the Genesis Framework v2.0 RC2. I found that the $loop_counter is missing from the genesis_standard_loop() when using HTML5. is this by design?
I have issues inserting content in between posts between the $loop_counter is no longer working.
Anyone having this problem?
An interesting question. The answer does indeed appear to be “yes”. There is a genesis_standard_loop function in 2.0. If HTML5 is not in effect, it performs genesis_legacy_loop instead, which contains the counter and the old hooks. No counter in the standard loop. It doesn’t say why it’s gone in the comments; I’m guessing that maybe they viewed it as not heavily used?
So it looks like you’ll need to code your way around that, unfortunately. I can see where that counter could be occasionally useful – off the top of my head, I’m thinking I would pull out the normal loop, and replace with a custom loop with a counter.
David Chu · Custom WordPress Developer – likes collaborating with Designers
If I edit the core files, I just have to add in three lines of code:
$loop_counter = 0; and
$loop_counter++;, but that mean I can’t just update the core files OTA.
Replacing with a custom loop with a counter is a good solution, but I think it is a waste of resources.
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.