pages - Changing title bar in browser window of theme "Encounters Lite"

I have an external php application for for genealogical research("TheNextGeneration", TNG) integrated into W

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Filter 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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信