• Resolved edobees


    First off: I like the Modula Gallery very much. The user interface and the custom post type approach is very neat. Most probably I will go for the ‘Pro’ version very soon. I also do understand that there are good reasons to promote your ‘Pro’ version. As far as I am concerned your ads would reach me as well and as effectively if they were not that loud 😉

    Now a more technical question: When looking at the HTML generated by Modula I stumbled over some <style> tags that I suppose have been generated by Modula.
    I noticed that Modula Gallery is inserting a <style> tag with content just before the HTML of your gallery. Although it seems to work in IE 11 (and other browsers I have tested) this placement is not ‘pure’ HTML standard. According to the HTMl (5) spec <style> tags are supposed to reside as immediate children either in <head> or in <body> – not in <div> or other child elements of <body>.

    What are your plans? Do you intend to ‘clean’ your HTML up with upcoming releases? Or did I make a mistake using Modula Gallery (free version) that leads to the ‘misplacment’ of <style>? Is there a way I can influence the positioning of your <style> tags?

    Any thoughts are very much appreciated. As I said: I do like Modula Gallery. (Probably even more with standard placement of <style> tags 😉 )

    • This topic was modified 5 years, 2 months ago by edobees.
    • This topic was modified 5 years, 2 months ago by edobees.
    • This topic was modified 5 years, 2 months ago by edobees. Reason: correction of some typos
Viewing 7 replies - 1 through 7 (of 7 total)
  • @edobees – right off the top of my head, there’s really no way we could address this. We debated this internally, and we encountered a multitude of issues. Conditionally loading the CSS of Modula inside the <head> section would require a mechanism of sorts that’ll allow us to check if Modula’s shortcode is actually being loaded on a page/post.

    Now, the above approach would come with serious technical limitations, such as:

    – There’s no way to tell when the shortcode would be loaded/used inside a page-builder or a widget that supports shortcodes
    – There’s no way to tell when or IF any other theme/plugin messes with the wp_enqueue_scripts function
    – Even if we were to figure out a way to implement this, it could potentially break compatibility with plugins such as Autoptimize

    And that brings me to my proposed solution for this. The great plugin Autoptimize, developed by Frank – https://wordpress.org/plugins/autoptimize/

    Autoptimize has an option called: “Also aggregate inline CSS?”. Turning this to ON will aggregate all inlined CSS into a single CSS file and move it to the header.

    Modula works great alongside Autoptimize and it will also help speed up your site while also fixing your issue at the same time 🙂

    Thanks for taking the time to read this!


    • This reply was modified 5 years, 2 months ago by Macho Themes.
    Thread Starter edobees


    Dear Christian,

    thank you so much for your quick reaction and the elaborate response.

    I was very sure that you had good reasons doing it this way. However, I am not sure that I have understood all the details of your explanation. I will dive a bit deeper into it – if time permits. 😉

    … and in the meantime I have Autoptimize to the rescue.

    Cheers and thanks. Continue the great work!

    @edobees – thank you for the nice words 🙂

    Have a great day!


    Thread Starter edobees


    Hi Christian,

    in the meantime I have taken a deeper dive into the MODULA code.
    I found an alternative to using a <style> tag inside a <div>.

    If you are interested let me know how I can send you the modifications for review. I’m very interested to hear your comments on my proposal. 3 files are involved.

    By the way: I published a plugin (wpg2mod) that converts WordPress galleries into Modula Galleries. Maybe it can be of use to others.

    All the best.

    @edobees – wow, this is absolutely amazing 🙂

    On our next plugin update, we’ll be updating Modula’s FAQ to include WPG2MOD in there. It’s such an amazing contribution 🙂 Greatly appreciated!

    Also, for your other solution, would you please be so kind to submit a pull request here: https://github.com/machothemes/modula-lite/pulls with your suggested changes? 🙂

    This way, someone from our development team can have a thorough look and decide if it’s OK to merge.

    Have a great day ahead!


    Thread Starter edobees


    Sorry @machothemes, Christian,

    that I have to ask about the pull request. I must also admit that I have not been using GitHub too much before.

    Unfortunately I am not able to issue the pull request. I was not able to create a new feature branch. I assume that I am not authorized. Any advice?

    I loggged into GitHub with my account (edobees). Presumably I do not have sufficient privileges to create a feature branch and therefore cannot issue a pull request.

    To address the <style> issue I modified 3 files.

    All the best,

    @edobees – just fork the repository over to your personal GitHub. There, you will be able to submit your suggested tweaks.

    After you’re done, you can create a pull request in our repo and we’ll be able to see what you’ve done differently.

    Alternatively, you can contact us via our contact form, here for further guidance re. contributing to our GitHub repo: https://wp-modula.com/contact-us/


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Using tag inside ?’ is closed to new replies.