Description
Returns the custom WP Geo marker title or defaults to the post title if a custom title is not set.
Usage
<?php get_wpgeo_title( $post_id = null, $default_to_post_title = true ); ?>
Parameters
$post_id
(int) Post ID. If null, defaults to the current post in the loop.
$default_to_post_title
(boolean) Returns the post title if no custom title set. Defaults to true.
Examples
Get the title for the current post in the loop.
<?php $my_title = get_wpgeo_title(); ?>
Get the custom title for post ID 30 and returns null if a custom title has not been set.
<?php $my_title = get_wpgeo_title( 30, false ); ?>
Notes
See also: wpgeo_title
Change Log
Since: 3.2
Source File
get_wpgeo_title() is located in wp-includes/templates.php.