I have no knowledge of PHP but I have already been hit so far that I want to put the last bit myself. As you can see below, I retrieve data from the database. Below is the part that it is about.
<div class="gp-hub-block gp-hub-block-three">
<?php if ( ghostpool_option( 'hub_fields' ) ) {
// Support for foreign characters
$char_table = array();
if ( function_exists( 'ghostpool_hub_field_characters' ) ) {
$char_table = ghostpool_hub_field_characters();
}
foreach( ghostpool_option( 'hub_fields' ) as $gp_hub_field ) {
$gp_hub_field_slug = strtr( $gp_hub_field, $char_table );
if ( function_exists( 'iconv' ) ) {
$gp_hub_field_slug = iconv( 'UTF-8', 'UTF-8//TRANSLIT//IGNORE', $gp_hub_field_slug );
}
$gp_hub_field_slug = sanitize_title( $gp_hub_field_slug );
$gp_hub_field_slug = substr( $gp_hub_field_slug, 0, 32 );
$gp_term_list = get_the_term_list( $post_id, $gp_hub_field_slug, '<table class="casino-info"><tbody><span class="aaa"><tr class="casino-info-titel"><th scope="row">' . __($gp_hub_field,'JDcustomnew') . ':</th><td scope="row" data-label="'<?php echo ($gp_hub_field ); ?>'">', ', ', '</td></tbody></table>' );
if ( ! $gp_term_list OR is_wp_error( $gp_term_list ) ) {
continue;
}
if ( ghostpool_option( 'hub_field_links' ) == 'disabled' ) {
$gp_term_list = preg_replace( '/<\/?a[^>]*>/', '', $gp_term_list );
}
echo wp_kses_post( $gp_term_list );
}
} ?>
</div>
</div>
You will see below for which part it is exactly
$gp_term_list = get_the_term_list( $post_id, $gp_hub_field_slug, '<table class="casino-info"><tbody><span class="aaa"><tr class="casino-info-titel"><th scope="row">' . __($gp_hub_field,'JDcustomnew') . ':</th><td scope="row" data-label="'<?php echo ($gp_hub_field ); ?>'">', ', ', '</td></tbody></table>' );
What I want to do is return the $gp_hub_field to the datalabel of my table. Unfortunately, I can not do this. Someone who can help me?
Don't blame me for my PHP skills please.
EDIT:
I see this with the PHP code in the data-label:
Its important for Google that the data label has the same title as the <TH>
I need to see this with the good data-lable title: