Forum Replies Created
-
AuthorPosts
-
paulangMember
wow.
Redirect has a few levels.
You can redirect from ur DNS, server (apache or Nginx) or from wordpress, and all are found in different places. What is it you want to achieve?
paulangMemberI figured out the problem, it is the wordpress editor that is removing the span tags as it doesnt recognise it to be useful.
So i used an easy way out, someone's plugin: "Protect schema.org markup in HTML editor"
So i managed to get the page working for now... I'm just going to leave it alone for now. I am happy enough getting my localBusiness schema up
https://www.punggolgp.com/contact/
But it somehow breaks images!!!
So anyway, you have to copy and paste your images urls directly into the code to get it working...
Not perfect, but can someone smart please save us please hahahha...
paulangMemberHey guys, don't bother clicking around these above links. I'm ashamed i wasted so much time googling.
But this nice dude here has done the work for us. Apparently quite easy as long we have done our due diligence in understanding genesis.
https://www.rfmeier.net/custom-microdata-with-genesis-2-0/
His code definitely works:
<?php //* do not include php tag add_filter( 'genesis_attr_body', 'about_page_body_schema' ); /** * Callback for Genesis 'genesis_attr_body' filter. * * Use the AboutPage microdata schema for the About page. * * @package Genesis * @category Attributes * @author Ryan Meier http://www.rfmeier.net/ * * @param array $attributes The array of attributes * @return array $attributes The array of attributes */ function about_page_body_schema( $attributes ) { // if About page, use the AboutPage schema if ( is_page( 'about' ) ) { $attributes['itemtype'] = 'http://schema.org/AboutPage'; } // if Services page, use the ContactPage schema if ( is_page( 'services' ) ) { $attributes['itemtype'] = 'http://schema.org/ContactPage'; } return $attributes; }
i've modified the is_page parameters to fit either the post id or the post title (google that). Pretty easy.
Works on my site here: punggolgp.com/contact/
Now the next step is to add the child elements: itemscope and itemprop .
Does anyone know if these can be keyed in directly in the body of the wordpress editor?
Thanks guys!
-
AuthorPosts