• Resolved Copiaurbietorbi

    (@copiaurbietorbi)


    Good day,

    We are trying to add a search engine bar to one of the sections of our theme.

    Everything looks well when we add the script, but once we save it is simply gone.

    Can your plugin help us to keep the script?

    Thank you for your help and interest!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Generally, this plugin only works for posts and pages, not theme widgets, sidebars, footers, etc. So it sounds like it probably wouldn’t work help in your case.

    One thing I can suggest is to make sure that the user/role you’re using to make the change has the unfiltered_html capability. This capability is required to add certain kinds of HTML to posts, and it could potentially also apply to some themes.

    Thread Starter Copiaurbietorbi

    (@copiaurbietorbi)

    Thank you for getting back to us.

    We do have admin privileges. The HTML code that we have added before has no change despite saving. This could be an indication the capability you mentioned is enabled.

    But either way, it would be a good idea to check. Where can find this?

    On another note, do you have any ideas as to what we could do to keep the script? We tried enclosing it by using <div>, <span>. We tried shortcodes and widgets and nothing has worked out…yet!

    Thank you again for your help!

    Plugin Author Janis Elsts

    (@whiteshadow)

    Usually, any role editor plugin would work as a way to check if a role has the capability. There are many plugins like that. For example: User Role Editor.

    There is a special case: in Multisite, only Super Admin users have this capability. Even if you manage to enable it for another role, it just won’t work.

    On another note, do you have any ideas as to what we could do to keep the script?

    Outside of posts/pages, I don’t think there really is a general solution. A theme could easily have some intentional safeguards that remove script tags from certain locations no matter what you do. The solution would have to be specific to the theme.

    Thread Starter Copiaurbietorbi

    (@copiaurbietorbi)

    Understood. We thank you for your help and interest.

    Have a good day.

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