Helping you Build Your Own Social Network!

Faster, better and easier!

schema.org integration

(8 posts) (2 voices)
  • Started 11 months ago by enderandrew
  • Latest reply from Brajesh Singh

  1. What would be the best way to utilize schema.org tags for search engines?

    A plugin, or theme customizations?

    http://schema.org/docs/full.html

    I think everyone can benefit from the authorship tags if nothing else.

    Posted 11 months ago #
  2. Hi T.J.
    Just checked it. As far as I see, it is possible in both ways., Using theme/or plugin. Doing it in the theme will be easier though. But as far as using it with Bp is concerned, BP needs to mature a little bit more, as there is no guarantee currently that some of the objects in the schema will be available or not.

    Posted 11 months ago #
  3. Since Google, Yahoo and Bing are all on board with this standard, so utilizing it will just help your search rankings. And if nothing else, it would be nice to use the author tags.

    Could you put together a quick blog post on how you might implement some of the tags in a theme?

    Posted 11 months ago #
  4. The main thing I'd like to do currently is to do something like this for "author" and "me" tags to be able to point to an xprofile field for Google Profile like this:

    http://yoast.com/wordpress-rel-author-rel-me/

    Posted 10 months ago #
  5. Ok,
    Let me try it now. Will update back.

    Posted 10 months ago #
  6. well, I managed to do that. it was pretty easy for the xprofile field.

    do you want theme links with the specific rel on users profile page just like the normal data ?

    Posted 10 months ago #
  7. That would be awesome!

    Thanks Brajesh, you're the best.

    Posted 10 months ago #
  8. Hi,
    Please put the following code in your theme's functions.php

    remove_filter( 'bp_get_the_profile_field_value', 'make_clickable');//stop auto linking of profile fields
    
    function my_google_filter($value,$type,$id){
        $rel=array("about"=>"me","author"=>"author");//$key=>$val where $key=Xprofile field name & $val= the rel value you want to apply
        $fields=array_keys($rel);//field names, case sensitive
    
        $current_field_name=bp_get_the_profile_field_name();
         //echo $id;
        if(!in_array($current_field_name,$fields))
                $value= make_clickable ($value);
        else
         $value="<a href='".$value."' rel='".$rel[$current_field_name]."'>".$value."</a>";   //use appropriate rel    
    
        return $value;
    }
    add_filter("bp_get_the_profile_field_value","my_google_filter",10,3);

    Please note, you will need to change

    $rel=array("about"=>"me","author"=>"author");

    where the key is the Xprofile field name(It is case sensitive, if you name it "About" the key should be "About" and not "about"

    The value is the Rel you want to apply(e.g "About"=>"me" will link the about field with "me" rel)

    Hope that helps.

    Posted 10 months ago #

Reply

You must log in to post.