The meta description isn’t part of the Twenty Fifteen theme.
You mentioned the Yoast plugin in a previous question yesterday, so I guess the meta description comes from there.
According to their API page, there’s a filter called wpseo_metadesc
that might be what you’re looking for.
Here’s an untested example:
/**
* Change the Yoast meta description for Android devices on the front/home page.
*/
add_filter( 'wpseo_metadesc', function( $description )
{
return
( is_front_page() || is_home() )
&& isset( $_SERVER['HTTP_USER_AGENT'] )
&& false !== stripos( $_SERVER['HTTP_USER_AGENT'], 'android' )
? 'Some Android description!'
: $description;
}, PHP_INT_MAX );
Related Posts:
- How to display a user’s bio (not the author or logged in user)
- How to fix a duplicated meta description?
- wp_insert_term does not insert description. [closed]
- Garbage code showing up in search result post descriptions
- How do I urlencode() the blog description?
- How can get Woocommerce product single description
- How do you change the site preview description/thumbnail
- Trying to update the meta description of the home page
- How strip the quotation from the meta descrption?
- HTML code in WordPress menu description
- get meta description of rank math in single post for schema
- get_template_directory() vs bloginfo( ‘template_directory’ ) vs TEMPLATEPATH
- What is difference between get_bloginfo(‘url’) and get_site_url()?
- From a security standpoint, should bloginfo() or get_bloginfo() be escaped?
- Remove the category/taxonomy description field?
- How do I change the login logo URL and hover title?
- Admin Filter – Add Post Type Description on Post Type Page
- bloginfo() vs get_option?
- Difference between bloginfo(‘home’) and home_url() and site_url()
- Is there a blog info object?
- How I can get image description/title/alt for gallery image?
- get_template_directory_uri() and other URL tags not working in theme
- bloginfo(‘stylesheet_directory’) vs. get_stylesheet_directory_uri() and include(‘file.php’) vs. get_template_part()
- Getting a div content of a post in wordpress?
- Show menu item description with line breaks
- Shortcode content does not show in feed discription/excerpt
- How to use tinyMCE for user “biographical info” without messing with any core file?
- Filter the blog title displayed in the header
- show term description instead of list terms of custom taxonomy
- Filter the blog’s title without using global variables
- Category Descriptions – HTML?
- Add visual editor to Media Edit Screen
- How can I add a default description to uploaded files?
- Show Subcategory Description
- How to display term description in empty terms archive?
- How to use different short description in shop page and in product page in woocommerce
- How to add meta tag to wordpress posts filter?
- How to use bloginfo( ‘template_directory’ ) in array
- Is it possible to change the template_directory?
- How to display a description of a given category from a custom taxonomy
- Adding a video description in a similar way to a image caption
- Displaying a custom taxonomy term’s name & description
- How come my first blog post and my home page have the same title?
- Right way to add HTML bloginfo name using a filter
- Image with description side by side
- Customized title tag for each page in pagination?
- Why doesn’t YoastSEO allow me to set the title/description for the home page? [closed]
- How do I create a dynamically-updated copyright statement?
- bloginfo(‘template_directory’) img src
- Get custom taxonomy description with paragraph tags
- Still relevant method of embedding images in WP Theme in 2018
- php syntax – how to concatenate properly – echo bloginfo(‘stylesheet_directory)
- Change Site Title and Description html tags if not home page
- Proper syntax for simple conditional bloginfo language
- Add title, post content, and category like add_post_meta and update_post_meta
- Change description on specific WooCommerce product status change
- How can I use get_bloginfo(‘admin_email’) in a custom PHP file?
- PHP code to call image Caption, Alternative Text, and Decription?
- Get meta data from image
- Add description to custom text widget and display the 5 recent post titles
- How to automatically remove links from WordPress Biographical Info?
- HTML tags in bloginfo description
- Header style different on home and remaining pages
- How to display post content instead of excerpt
- Return post tags with description
- Showing image description along with embedded links below post images
- sprintf bloginfo odditie
- Show preset taxonomy description
- How to modify an existing meta description?
- Custom Tag Description unable to display just below and outside of the Loop
- Move category description below post list in blog
- Admin Filter – Add Post Type Description on Post Type Page
- How can I add an area/option for a custom page description?
- My “Description” in gallery doesn’t accept formatting/html
- Access bloginfo, get_option, and plugins_url from a non-core php file
- Change “en-US” to “en”
- Where does Yoast SEO plugin sets the site/page title?
- if not empty bloginfo(‘description’)
- Display a tag only if there is a description
- Are get_bloginfo queries cached to start, or should they be cached?
- Change description of my Jetpack facebook shared links [closed]
- Clean links in: the_author_meta(‘description’)
- Display site description instead of site name
- What is the difference between the different ways of linking stylesheets
- Form action unfamiliar
- Should I use get_bloginfo(‘stylesheet_directory’) or get_stylesheet_directory_uri() when enqueueing my js files?
- Is this the proper way to get a taxonomy description into a post template?
- WordPress address URL and bloginfo
- How to call for bloginfo inside function in functions.php?
- “Item not updated” when try to change category properties
- Wp Enviroment problem with included file
- how to remove description from menu buttons?
- WP HTML Templates – Any way to get bloginfo() or the path to the theme folder?
- How to set the meta description of a WooCommerce product as its primary category description?
- WordPress Show Parent Category Description for Sub-categories
- Add description to custom plugin setting
- How to Get The Excerpt of the page that displays Blog Posts
- how to hide empty fields of post category description?
- How to select a paragraph other than the 1st to be the post’s excerpt?
- How to display featured image description and title?