Tumblr Themes - Custom Blocks

I am creating a tumblr theme and I am completely new to it.

Now I know that the user can customize his blog, for example, add a title or description that I can display with {blocks} .

However, I would like the user to add his contact details, for example links to his social networks.

How does tumblr usually handle this? Does the user need to edit HTML? That would mean that I need to hard code this. Not very nice.

Or can I somehow add custom {blocks} ?

+4
source share
1 answer

From the theme customization guide , it seems you just need to include certain tags in the theme, and they will appear in the Customize panel user’s.

By including custom metatext tags in your topic, users can easily customize the text variables that you define. This is useful for customizing text or customizing widgets that require information from the user.

Example

 <html> <head> <!-- DEFAULT TEXT --> <meta name="text:Flickr Username" content=""/> </head> <body> {block:IfFlickrUsername} <div id="flickr_widget"> <script type="text/javascript" src="http://flickr.com/widget?user={text:Flickr Username}"> </script> </div> {/block:IfFlickrUsername} </body> </html> 

From the above example, it looks like {text:Flickr Username} means that the user-configurable input field should be text input and have the label "Flickr username", then in the {block} tags you should use the label without spaces, as your variable name .

+6
source

All Articles