Skip to main content

How can insert a twitter feed into the sidebar of a locked theme?

Greetings,

I am making a theme that will be re-used by a hundred sub nations. I have to keep the theme elements LOCKED because I don't want any one of them making a change to the theme that will show up on the other ninety-nine sub nations. 

Each sub nation will have their own individual twitter handle and most of them will want their twitter feed in the sidebar.  

Because twitter deprecated their v1 script, the only way to get the new script is to go to https://twitter.com/settings/widgets and generate a new one for each twitter handle. There's no way to automate this (that I know of, anyways).

I want each of the sub nations to be able to put their twitter widget  into the sidebar of _columns_2.html without giving them access to the theme. 

Ideally, I'd like to have each sub nation user put their twitter widget on something that could be pulled in automatically.  Like, for example, an include file, that could be called.  

Is it possible to make ONE include file accessible for editing without unlocking the ENTIRE theme?

Would some other method work better? 

Thank you!

Official response from

Hi Tim,

You can actually share themes without making them editable to the nations you share it with; simply uncheck the "Nations I have shared this theme with can also edit it" option on the custom theme settings page:

Theme Settings Page

Barring that, you would need some logic within the _columns_2.html template to look at the URL of the site (in JavaScript that'd be window.location.href) and to insert a different twitter widget (perhaps using jQuery's .html() function) based on the nation it's on.

Share this post

Showing 4 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.