Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #290512

    drplasticine
    Participant

    Hi, I would like to know if there is a way to add structured data markup to my theme x wordpress website, specifically something Google is calling “Music Play Actions” for music artists.

    URL: morganganem.com
    Wordpress Version: 4.2.2
    theme version: 3.1.1
    shortcode plugin version: 2.6.1

    Thank you for your help,
    Morgan

    #291262

    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    Although that we would love to help your with this, it is beyond the scope of our support and it would be best to contact a developer dedicated to this kind of coding.

    We hope that you’ll understaind. Thank you so much.

    #293935

    drplasticine
    Participant

    Thank you, I have researched structured data markup more since our last conversation. I understand it, just need to be able to know where to put it. How can I access the area to place the code? Is that via my wordpress dashboard or my hosting provider (Godaddy)?

    Thanks.

    #293943

    CharliePryor
    Participant

    I believe structured data is placed on the page itself, and it’s on a per-page basis.

    Charlie

    #294619

    Rue Nel
    Moderator

    Hello There,

    To help you understand the Structured data markup, please check out this articles:
    https://developers.google.com/structured-data/
    https://support.google.com/webmasters/answer/3069489?hl=en

    To add a structured data markup for your post and pages, since what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please insert this code in your child theme’s functions.php

    if ( ! function_exists( ' add_data_markup' ) ) :
    function add_data_markup( $content ) {
      
      $t = get_the_modified_time('F jS, Y');
      $author = get_the_author();
      $title = get_the_title();
    
      if ( is_singular() ) {
       $content .= '<div class="hatom-extra hide hidden"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
      }
      
      return $content;
    }
    add_filter('the_content', 'add_data_markup');
    endif;

    Hope this helps. Kindly let us know.