This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

microdata erased from the footer

  • Creator
    Topic
  • #12037
    drsgonzalez
    Member

    Hi again.

    I just tried to add some localBusiness microdata in the footer of the website, but after saving changes, microdata are gone. I have tried both checking and unchecking the “Apply WordPress automatic formatting” box.

    I created a footer with only one column and raw content.

    Could you please help me in order to get this done? hope no CSS modifications are needed.

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #12058
    Jason Bobich
    Keymaster

    Hello,

    This will most likely require PHP customizations on your part from your child theme’s functions.php in order for your custom HTML to pass sanitization.

    What version of Akita are you currently using? And what is the microdata you’re trying to put in? You can paste it here in the forums within <pre> tags so it’ll show up.

    #12081
    drsgonzalez
    Member

    I’m using the last version.

    suggestion: checkbox to bypass sanitization 🙂

    Just kidding… well, not really, it’d be wonderful.

    Great support Jason, thanks a lot.

    #12084
    Jason Bobich
    Keymaster

    Ha well sanitization is for security. So that would kind of defeat the purpose to have a checkbox in the form that disabled it. 😉

    This article is a little dated, as now in the latest version much more HTML is accepted, but all other information is still relevant:

    http://www.jasonbobich.com/theme-forest-updates/expanding-accepted-html-tags-in-the-theme-blvd-wordpress-theme-framework/

    I can help you with the instructions in that article, I’d just need to know what your HTML looks like.

    #12094
    drsgonzalez
    Member

    Thanks a lot.

    I don’t really remember the code I was trying to, but it was slightly modified from the one obtained from http://www.microdatagenerator.com, somethink like the next code:

    <div itemscope itemtype="http://schema.org/Physician">
       <span itemprop="name">Clínica González & Campos</span>
       <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
         <span itemprop="streetAddress">Plaza de Castilla 3</span>
         <span itemprop="addressLocality">Madrid</span>,
         <span itemprop="addressRegion">Madrid</span>
         <span itemprop="postalCode">28046</span>
       </div>
       Phone: <span itemprop="telephone">913158185</span>
       <a href="https://maps.google.es/maps?q=cl%C3%ADnica+Gonz%C3%A1lez+%26+Campos&hl=es&ie=UTF8&ll=40.466817,-3.689582&spn=0.011248,0.022724&sll=39.675036,-3.160988&sspn=5.825137,11.634521&hq=cl%C3%ADnica+Gonz%C3%A1lez+%26+Campos&t=m&z=16&iwloc=A" itemprop="maps">URL of Map</a>
    </div>
    #12104
    Jason Bobich
    Keymaster

    All right so it looks like essentially you just want to add parameters itemscope, itemtype, itemprop to be accepted with <span>, <div>, and <a> HTML tags.

    function my_allowed_tags( $tags ) {
    
    	// <div>
    	$tags['div']['itemscope'] = true;
    	$tags['div']['itemtype'] = true;
    	$tags['div']['itemprop'] = true;
    
    	// <span>
    	$tags['span']['itemscope'] = true;
    	$tags['span']['itemtype'] = true;
    	$tags['span']['itemprop'] = true;
    
    	// <a>
    	$tags['a']['itemscope'] = true;
    	$tags['a']['itemtype'] = true;
    	$tags['a']['itemprop'] = true;
    
    	return $tags;
    }
    add_filter( 'themeblvd_allowed_tags', 'my_allowed_tags' );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.