I know it's possible to create blog-wide meta-if boolean variables in Tumblr themes (e.g. {block:IfNotReversePagination}), but it is it possible to do something similar for individual posts?
For instance:
I'd like to be able to create several different widths for Photo posts, and it seems that the easiest way to do that would be to have a checkbox in the Edit screen for a post, labeled Wide Photo or something similar, that I could use to add a class in the theme markup.
Is this possible? If not, is there another way to accomplish something similar?
On a per-post basis you can enter a tag to the post. Say you enter widephoto as a tag on a post you can use the {TagsAsClasses} template tag on your posts to check it.
<article class="{TagsAsClasses}"></article>
If you don't want the tag showing up in the tag listing for the post you can remove it via JS (though it will still show up in the Tumblr Dashboard).
Related
I am really a beginner, trying to improve my wife's Wordpress website. What I am wanting to do is to hide a certain element (of the header, in this case) on mobile only. I already managed to figure out the "name" of this element, which is .vc_custom_xyz. I also managed to hide this element by adding additional CSS to any given page. BUT: This doesn't work for the blog post page - which simply ignores all CSS that I add. Also, when I add CSS into the theme's additional CSS section by referring to the blog page ID. Any ideas to help me achieve this? Thanks...
I want to add a line of code into a post with a certain tag and only that tag, I'm not sure how to go about that since I don't see any kind of class with each post.
Can someone point me in the right direction?
I believe you would not be able to do that by tag, because Tumblr doesn't associate individual tags with a class, but you could in theory do this for post type (Text, Photo, Quote, etc.)
I am currently designing a website where there is a facebook like box embedded on it.
The default of facebook looks something like this:
But instead of that look, I want the friend's icons to appear on the same line as the like box similar to this:
Does anyone have any idea to do this one? I tried adding several styles on the css and override the class given by facebook but it won't work.
The like button is generally an iframe so your styles will not affect it. Also as it is on a different domain, I'm not sure if you could even manipulate it by adding your own styling to the tr elements via javascript (setting them to display:table-cell achieves what you want) due to cross domain access issues. Finally I'm not sure if there are platform policies that would also be invalidated by doing this, which could have negative effects on your facebook intergration
I am using the Advanced Custom Fields Plugin (http://www.advancedcustomfields.com) with the options page add-on so I can use global variables throughout the theme (on multiple pages).
I don't know PHP and I'm trying to get the custom field from the options page by using a shortcode in the content on the different pages inside the WYSIWYG editor.
Is this possible? I can't figure out how to do it after days of trying. Can anyone help? I've tried going to the plugin's support and haven't gotten anything back.
Please Help! I really need to get this working!
References:
http://www.advancedcustomfields.com/docs/functions/using-shortcodes/
http://www.advancedcustomfields.com/add-ons/options-page/
Figured out a way around it. I can just use the shortcode they provide to reference a specific post/page ID which accomplishes the goal of only having to put it in once and it being rendered at multiple pages as long as the shortcode is there and properly formatted.
Use the post_id of option in your shortcode as per this example:
[acf field="myfieldname" post_id="option"]
Block type: Text Block (WYSIWYG field)
Text:
[acf field="NAME-OF-ACF-FIELD" post_id="options"]
Image (Return Format: Image URL) and alt text:
<img src="[acf field='NAME-OF-ACF-FIELD' post_id='options']" alt="[acf field='NAME-OF-ACF-FIELD' post_id='options']" />
I want to have multiple Facebook Like Buttons on a single page, all pointing to the same URL. My understanding of the Like Button is that you are liking the URL of the page. But, say for example I have a page with several product attributes, maybe a t-shirt in different colors (Red, Blue, Green, etc.). Each of these colors does not have it's own URL.
Is it possible to like the same URL multiple times? Person likes Red Shirt, Person Likes Blue Shirt, etc.
I attempted to do this with hashtags, yet this did not work. Initial thoughts were to dynamically change the Open Graph Meta tags via Javascript, but A) that doesn't combat the issue of the same URL, and B) that would only work assuming the Facebook API pulls the information from the Meta tags immediately after the click, and not on initial page load or with a separate remote call.
Any ideas?
NOTE: I can not append a query string to the url (i.e. mysite.com/t-shirt?color=red )
You should really consider creating a single page for every product.
This will bring you additional benefits:
- images and product links in the news feed;
- much better seo for the single product;
- much better seo for your website.
Are you using a cms?
EDIT:
There are a few examples if you google it. But all of them require you to at least create a very basic html page. It's easy and fast.
You can try being more specific about your situation if you need better help.
The only way to do this is dynamic. It uses php. So the address for every button will be the redirecting to the php... something like this:
For the tShirt red:
http://www.yourDomain.com/tshirt.php?color=red
For the tShirt blue:
http://www.yourDomain.com/tshirt.php?color=blue
Put every address in the like button href-param
This work for me every time that i used for multiples Facebook's like buttons.