• Resolved dmillersg77

    (@dmillersg77)


    Hello,

    I use a plugin that auto creates pages which are known tome as post types. Since the pages are generated automatically when people want to create a page, I don’t have access to asset cleanup like I would for an admin generated page I have complete granular control over.

    How can I define which assets to load and or unload for these auto generated post types?

    I know I can unload all assets site wide and then I could load the assets back on to the pages I control but for obvious reasons this would take a long time. I have nearly 200 custom pages and have already taken the time to configure asset cleanup for each one of these pages.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @dmillersg77 can you let me know the name of the plugin you’re using to create these particular post types? Also, are we talking about a single post type with lots of auto-generated pages or multiple post types that are generated automatically (e.g. 10 pages having 10 different post types)? The more information you can provide me (e.g. the URL structure), the better!

    Thread Starter dmillersg77

    (@dmillersg77)

    Thanks for responding!

    The plugin is called gravity view.
    I think to answer your question the pages would all have the same post type but a different url.

    Plugin Author Gabe Livan

    (@gabelivan)

    @dmillersg77 in this case, you have to bulk unload the CSS/JS you do not need on the custom post type. When you edit one of those automatically generated pages, you will notice the option “Unload on All Pages of [custom post type slug here] post type”.

    I hope it helps! Let me know if I can further assist you at your earliest convenience!

    Thread Starter dmillersg77

    (@dmillersg77)

    I enabled asset cleanup up on the front end since up the assets weren’t appearing in the backend. Visited the page and then was able to unload everything t for that custom post type. Thanks but need to double check I unloaded on all pages for that custom post type and not just that page lol. Pretty sure I did but will double check.

    Thanks

    Plugin Author Gabe Livan

    (@gabelivan)

    @dmillersg77 It’s enough if you just randomly check a few of those pages. Asset CleanUp checks if the page is belonging to that post type. If it does, it applies the unload rule. It doesn’t matter if you delete or add new pages for that post type.

    If for instance, you have 10,000 pages for a post type and you applied an unload rule, you can randomly check 10 of them if you want to be sure the rule was applied.

    Note that you can also make load exceptions for certain pages if there are any post type pages that would need to load the CSS/JS you unloaded for all custom post type. There are many possibilities as you likely noticed in the management list.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Post types’ is closed to new replies.