I have an external php application for for genealogical research ("TheNextGeneration", TNG) integrated into WP. The integration plugin hooks the external content into a blank WP page and displays the genealogical data there.
Because it is always the same page, the browser window shows only the name of the WP page in the title bar. Since each of the TNG pages comes with its own title, I like to have this information used instead.
The theme in use is "Encounters Lite" (if this is relevant).
Thanks!
I have an external php application for for genealogical research ("TheNextGeneration", TNG) integrated into WP. The integration plugin hooks the external content into a blank WP page and displays the genealogical data there.
Because it is always the same page, the browser window shows only the name of the WP page in the title bar. Since each of the TNG pages comes with its own title, I like to have this information used instead.
The theme in use is "Encounters Lite" (if this is relevant).
Thanks!
Share Improve this question asked May 10, 2014 at 13:06 mzurhorstmzurhorst 375 bronze badges1 Answer
Reset to default 0Filter wp_title
, get the current page title from your external app, and return that title.
Sample code:
add_filter( 'wp_title', function( $title ) {
// check if it the correct page
if ( ! is_my_external_app_page() )
return $title;
return get_title_from_external_app();
});
The implementation details are up to you.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745271018a4619745.html
评论列表(0条)