Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Where do i find the means to trim this stuff

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #45299
    JohnMotylJr
    Participant

    Diving into wordpress this evening and i am using a SUPER AWESOME theme, underscores theme.

    What i want to change:

    Every link put into my head, i want to strip type="text/css" and type="text/javascript". I have been through tons of files, searched the codex and even found spots where the php is echoing out that attribute, but still no changes, also cleared the cache, nothing.

    Now, i can easily write some JS to rip out those attributes, but why add more code when i can just comment it out.

    #137674
    chrisburton
    Participant

    > Now, i can easily write some JS to rip out those attributes, but why add more code when i can just comment it out.

    You’re most likely going to have to write code to strip those attributes in functions.php

    Another reason to hate WordPress ;)

    #137676
    JohnMotylJr
    Participant

    @chrisburton, side note, i know you are an advocate of Kirby, is there total control in that CMS in regards to how your code is rendered apposed to WordPress?

    #137684
    chrisburton
    Participant

    Can you be a bit more specific? What do you mean by “how your code is rendered”?

    #137692
    JohnMotylJr
    Participant

    Yeah, MVC style. The server side code would load a script tag into the page dynamically through a function in which controls each part (script open tag | type attribute | sec | end script tag).

    Since WordPress takes control of loading stuff like that, in Kirby can I just echo the script? Something simple like this:


    echo "<script src='" . $src . "'></script>";

    #137707
    chrisburton
    Participant

    I’m not sure if you can or cannot.

    Update: I believe what you’re asking is in fact possible with Kirby. Kirby doesn’t output fixed attributes or any of that nonsense you get with WordPress. Basically you have control over your code.

    To echo out scripts, you do this:

    #137890
    chrisburton
    Participant

    Seems unnecessary.

    #137912
    TheDoc
    Member

    @JohnMotylJr – you have the ability to simply include those files yourself.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Back End’ is closed to new topics and replies.