meta-tags

Dynamic Facebook og Meta Tags in Wordpress PHP

青春壹個敷衍的年華 提交于 2019-11-29 04:28:14
I am trying to add dynamic Facebook og meta tags to my Wordpress site. I am adding them to single.php instead of the usually recommended functions.php file because I have code below that for a Facebook app I've created that needs to execute every time someone views an individual blog post because it then posts to their Facebook timeline that they've read that particular post. I don't want to use a plugin because some of my plugins used to conflict with each other and it was a mess to get that straightened out. My biggest problem is that I need the og:url tag to be dynamic, though the og:title

How to insert metatag without using jquery append?

左心房为你撑大大i 提交于 2019-11-29 04:21:20
I used the following jquery to insert a metatag into a html document. <script type="text/javascript"> if(screen.width>=320 && screen.width<=767){ $('head').append('<meta id="viewport" name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">');} </script> If possible, I'd like to insert the metatag without using jquery. Anyone have any ideas how I can do that? I believe I will probably need to use document.getElementByTagName but I'm not sure how. Just in case you are wondering, I am inserting the metatag into my html to to optomize the site for viewing with

Changing Facebook meta tag Content Attribute using JQuery

拥有回忆 提交于 2019-11-29 03:57:20
I want to know how can I use JQuery in order to replace the content attribute of my Facebook meta tags. I searched StackOverflow and what I've found was this example: $("meta[property=og:title]").attr("content", title); $("meta[property=og:url]").attr("content", url); In my code I have the following meta tags: <meta property="og:title" content="some content"/> <meta property="og:url" content="some content"/> <meta property="og:site_name" content="some content"/> When I run the function that should change the content for the 'title' and 'url' variables, the change doesn't take place. The same

Bad values in meta tags

99封情书 提交于 2019-11-29 03:19:33
I've got a problem when I pass the html5 validator to my site from w3c validator. The errors are next: Bad value Content-Script-Type for attribute http-equiv on element meta <meta http-equiv="Content-Script-Type" content="text/javascript" > Bad value expires for attribute http-equiv on element meta <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT" > Bad value pragma for attribute http-equiv on element meta <meta http-equiv="pragma" content="no-cache" > Bad value Cache-Control for attribute http-equiv on element meta. <meta http-equiv="Cache-Control" content="no-cache" > What

Viewport meta tag for iOS devices

别说谁变了你拦得住时间么 提交于 2019-11-29 03:06:56
Does stating <meta name="viewport" content="width=device-width" /> have the same effect as stating <meta name="viewport" content="width=768" /> for the ipad? andreasbovens It depends indeed on the orientation of the device: setting a specific pixel value will cause your layout to be scaled up with a factor of 1.333 to fit inside the 1024px device width when in landscape mode. Setting width=device-width on the other hand will not scale anything up, but change the viewport width, for which you then can craft an optimized layout using media queries. Or that is at least the theory: the iPad

Google +1 Generated Thumbmail in Profile

心已入冬 提交于 2019-11-29 02:52:15
问题 When you press the google +1 button on a site it grabs the typical meta data such as title and description. I thought it might be looking for the first image in the first article tag, but I tried changing the image and the thumbnail did not change. Does anyone know how the thumbnail is generated? Can it be added as meta info (similar to facebook likes)? Can it be linted? The thumbnail i'm talking about: 回答1: There aren't any tools for developers on google+ yet. You can subscribe for developer

Is there a standardized (meta?) tag for the date of a website?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 01:44:41
问题 One thing that search engines really suck with is the date when a website was created. You know the problem: You search for some CSS or JavaScript problem and Google returns a ton of results from 2002 explaining how to fix the problem in IE 5.5 and Netscape 4.6 while the helpful articles are buried on Page 3. There is only one use for Page 3, and meaningful search results are not it. Anyway, I just wonder if there is a standardized or at least generally accepted tag or meta tag that I can put

Why do we need the meta content type tag in HTML head?

无人久伴 提交于 2019-11-29 00:35:57
问题 Why do we need to include the meta content type tag in HTML head like this? <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> 回答1: Whenever the webpage is been opened locally (from disk file system), the text/html part will instruct the webbrowser of which type the document is so that it knows how to parse it and the charset=UTF-8 will instruct the webbrowser which character encoding should be used to display the characters on the webpage so that it won't

Razor Engine - SEO Meta tags

﹥>﹥吖頭↗ 提交于 2019-11-28 20:23:03
问题 I need to place unique description and keywords meta tags to each page. Tried this. But its not clicking. @{ ViewBag.Title = "Title"; ViewBag.Description = "Test"; ViewBag.Keywords = "Test1, Test2, Test3"; } How do I place the meta tags in MVC 3 Razor Engine? 回答1: In the layout you could define a section: <head> ... @RenderSection("metas") </head> and in view: @section metas { <meta name="description" content="Test" /> <meta name="title" content="Title" /> <meta name="keywords" content="Test1

Meta Tag “apple-mobile-web-app-capable” for Android?

萝らか妹 提交于 2019-11-28 20:09:01
问题 Is there a way to create an Android Web Application like on the iPhone? Using the "apple-mobile-web-app-capable" meta tag in the head element of an HTML page, it informs the Apple iOS that the application can be installed to the users springboard so that it starts the Safari Mobile browser without a menu bar. 回答1: Chrome on Android now supports a meta-tag mobile-web-app-capable: Since Chrome M31, you can set up your web app to have an application shortcut icon added to a device's homescreen,