WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Facebook: Advanced Optimization for All Social Websites
[resolved] Feature for "og:title" (3 posts)

  1. s_berntheisel
    Member
    Posted 1 year ago #

    Hi jsmoriss,

    I thought it might be good to have the possibility (option via checkbox) to use the plain wp_head() call for generationg the title content instead of using your pre-defined separator in the wp_head() call, see following line of code.

    Line: 798
    $title = trim( wp_title( '|', false, 'right' ), ' |');

    Some SEO-Plugin's are optimizing/formatting the title, so you have just to use wp_title() in your templates. Separators are not anymore hardcoded and can be changed in a global way by the SEO Plungin.

    In my case I use the Genesis Framework which is quiet popular and comes with exactly this SEO function. Only for completeness the Genesis Framework also wraps the wp_title with the standard HTML-Tags <title>wp_title</title>, but this behavior can be removed by using the following filter.

    Remove Genesis title wrapping
    remove_filter('wp_title', 'genesis_doctitle_wrap', 20);

    What you think?

    Cheers

    Stefan

    http://wordpress.org/extend/plugins/nextgen-facebook/

  2. s_berntheisel
    Member
    Posted 1 year ago #

    Forgot to say.

    If the title is completly handelt by a SEO Plugin in the wp_head should be the following.

    Line: 798
    $title = trim( wp_title( '', false ) );

    Cheers

    Stefan

  3. JS Morisset
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, done. I've added a "Title Separator" option. Its used in a few places, not just with wp_title():

    $ grep -n og_title_sep nextgen-facebook.php
    78:                     'og_title_sep' => '|',
    798:                    $title = trim( wp_title( $this->options['og_title_sep'], false, 'right' ), ' ' . $this->options['og_title_sep'] );
    809:                                    false, ' ' . $this->options['og_title_sep'] . ' ',
    810:                                    false ), ' ' . $this->options['og_title_sep'] );
    812:                            $title = preg_replace('/\.\.\. \\'.$this->options['og_title_sep'].' /', '... ', $title);
    817:                            $page_num = ' ' . $this->options['og_title_sep'] . ' ' . sprintf( 'Page %s', max( $paged, $page ) );

    Download the latest DEV version at http://downloads.wordpress.org/plugin/nextgen-facebook.zip, and let me know if that addresses your issue.

    Thanks,

    js.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic