meta-tags

Place category_description in the meta description (wordpress)

我只是一个虾纸丫 提交于 2019-12-12 01:58:08
问题 Header in my theme I created the following code for the meta description: <?php if (is_single() || is_page()) { ?> <meta name="description" content="<?php echo metadesc($post->ID); ?>" /> <?php }else{ ?> <meta name="description" content="<?php bloginfo('description'); ?>" /> <?php } ?> and included this code in my function.php: function metadesc($pid) { $p = get_post($pid); $description = strip_tags($p->post_content); $description = str_replace ("\n","",$description); $description = str

How to render whatsapp content in preview dynamically?

爱⌒轻易说出口 提交于 2019-12-12 01:42:28
问题 I have an application where i use dynamically rendering of meta tags. I am using pre render services to render meta content dynamically. It works for facebook, google..etc but for whatsapp it is not able capture dynamic content. It is showing like {{meta.content}}. How can i remove preview from whatapp while sharing from js? Is there any solution to capture preview dynamically? 回答1: If you want to render dynamic content that you need take help of .htaccess. RewriteCond %{HTTP_USER_AGENT}

Trying to validate HTML5 on Joomla 2.5 site but I have some meta-problems

允我心安 提交于 2019-12-11 21:24:18
问题 I´m currently trying to clean up a Joomla 2.5 site for HTML5 validation but I have a problem. The HTML5 validator is reporting the following errors: "Bad value og:title for attribute name on element meta: Keyword og:title is not registered." "Bad value og:type for attribute name on element meta: Keyword og:type is not registered" "Bad value og:url for attribute name on element meta: Keyword og:url is not registered" "Bad value og:site_name for attribute name on element meta: Keyword og:site

Youtube Google API V3: List Videos not returning video tags

这一生的挚爱 提交于 2019-12-11 19:23:16
问题 I am currently trying to get the tags of a youtube video using the Google API V3. I am authenticating my business account and querying for videos we have uploaded through that account. I am not seeing tags for the videos I am querying for. (Yes, they do have tags applied to them) When I authenticate with my personal account, and query videos that I have personally uploaded, I am able to see the tags for those videos. Both accounts have the Youtube Data API enabled under the https://console

Add MetaTags Using JavaScript

浪尽此生 提交于 2019-12-11 14:06:26
问题 I have a website http://gornany.org/home/GammaGallery/1390?id=0 i want to show the image on Facebook profile which the user write a comment about, i want to change this code using JavaScript <meta property="og:image" content="" /> i tried a lot of things like $("meta[property='og\\\\\\\\:image']").attr("content",""); $('meta[property="og:image"]').attr('content',"" ); but nothing work Any help? 回答1: I dont think you can do that. Javascript is a client-side language so when Facebook reads the

Meta Refresh with a frame target

你离开我真会死。 提交于 2019-12-11 11:47:29
问题 I have a very basic frame layout: index.html <frameset rows="80,*" frameborder="1" border="5" framespacing="0"> <frame name="topNav" src="top_nav.html"> <frameset cols="220,*" frameborder="1" border="5" framespacing="0"> <frame name="menu" src="menu_1.php" marginheight="0" marginwidth="0" scrolling="auto" noresize> <frame name="content" src="content.php" marginheight="0" marginwidth="0" scrolling="auto" noresize> </frameset> </frameset> And a simple login script which checks if the username

Wordpress loop to filter out by meta

左心房为你撑大大i 提交于 2019-12-11 11:34:58
问题 This kind of follows on from a previous question where JanW : http://bit.ly/VQy9hb I'm trying to hide posts that contain certain meta data, in this case meta_name = "smartPrivate". The function below works but unfortunately also affects the menu loop (it just disappears). Does anyone know how I can hide these posts from appearing in all loops but not affect the menu (and who knows what else...) Thanks in advance Rob function hide_some_posts( $query ) { if (!is_user_logged_in()) { $query->set(

get an array of meta tags php

Deadly 提交于 2019-12-11 10:23:28
问题 How can I get all of the values from the <meta> named "tag" and echo them on the page? this is the HTML im using: <meta name="tag" content="plant"/> <meta name="tag" content="leaf"/> <meta name="tag" content="waterdroplet"/> <meta name="tag" content="water"/> PHP that im using: $tags = array (get_meta_tags ( "http://s0ulp1xel.x10.mx/background-garage/?p=photo&photo=1")); echo $tags; The result is that it only echos the last <meta> named "tag". 回答1: get_meta_tags returns an array, use print_r(

Assigning multiple variables to a single in PHP

家住魔仙堡 提交于 2019-12-11 08:12:10
问题 What I want to do is call all of my meta tags from one variable kept in the variables.php file. I can echo them individually but I want to assign them all the same name so the echo script in the webpage is smaller. I understand that this is how you assign the same value to an integer but I cannot find the solution to do this with string values(I think they are string right?) $john = $ jane = 3; What I am trying. $metaAuthor = $metaDescription = $metaImage = $metaTitle =$meta; I assume its a

Angular Universal - OG meta tags not working with child routes

ε祈祈猫儿з 提交于 2019-12-11 07:35:08
问题 My website hosted on http://abc.xyz.com OG meta tag works for the main page. If I am adding it to the child routes it doesn't work. for example - http://abc.xyz.com/pqr/slug-url. index.html <meta property="og:type" content="article"> <meta property="og:site_name" content="XYZ" > <meta property="og:title" content="XYZ" > <meta property="og:description" content="XYZ" > <meta property="og:image" content="xyz imagepath" > <meta property="og:url" content="xyz url" > component.ts this.meta