• Resolved markhem

    (@markhem)


    Nick. This is brilliant. I’ve been trying to figure out for quite some time how to do conditional headers. I never imagined I could place them on so many hooks. It makes sense now, but I didn’t see it before. Since I am just learning php and Genesis I am interested in seeing what code blox is creating. I’ve searched through the blox-lite files but can’t find the folder. Would it be too much to ask where blox stores the code it generates?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Nick Diego

    (@ndiego)

    Hi markhem,

    I am not entirely sure what you mean, but local blocks are stored as meta data on the post/page/cpt they are attached to. This data is an array that contains all of the local blocks that have been created for that post/page/cpt. On the frontend (see the frontend file), Blox looks at the array of local blocks and loops through each one, attaching it to the hook specified.

    Global blocks operate the same way on the frontend, but they are actually a custom post type. So on the frontend, Blox looks at all of the global blocks and loops through them to determine where they should be located and positioned. The pro version of Blox Lite has an additional step that looks at visibility.

    In terms of the markup that Blox generates, look at the Content folder. Each content type has it’s own markup and whatnot.

    I hope this helps!

    Thread Starter markhem

    (@markhem)

    Thanks for the explanation, Nick. I was thinking blox was creating functions in a file somewhere, like Genesis Extender, so that I could learn from the functions it creates. However, this is a completely different solution.

    I really like blox gives me ability to place things in multiple locations. Thanks for creating a free version.

    Plugin Author Nick Diego

    (@ndiego)

    If you are interested in the logic behind, lets say, the location stuff. Take a peak at includes->global->location.php. Line 1042 is where the “magic” happens. Good luck!

    • This reply was modified 7 years, 6 months ago by Nick Diego.
    Thread Starter markhem

    (@markhem)

    I took a look at the locations file, and that’s the stuff I was wondering about. But, way above my coding ability. This is an amazing piece of work, Nick. Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘code storage’ is closed to new replies.