related_post_loop_item_element_$id

Action hook for each element

post_title

add_action('related_post_loop_item_element_post_title','related_post_loop_item_element_post_title_20200126', 10, 2);

function related_post_loop_item_element_post_title_20200126($loop_post_id, $elementData) {

    //$option_id_value = isset($elementData['option_id']) ? $elementData['option_id'] : '';
    //$post_meta_value = get_post_meta($loop_post_id, 'meta_key', true);

    ?>
    Element HTML for  post_title <?php //echo $option_id_value; ?>
    <?php

}

 

post_thumb

add_action('related_post_loop_item_element_post_thumb','related_post_loop_item_element_post_thumb_20200126', 10, 2);

function related_post_loop_item_element_post_thumb_20200126($loop_post_id, $elementData) {

    //$option_id_value = isset($elementData['option_id']) ? $elementData['option_id'] : '';
    //$post_meta_value = get_post_meta($loop_post_id, 'meta_key', true);

    ?>
    Element HTML for  post_thumb <?php //echo $option_id_value; ?>
    <?php

}

 

post_excerpt

add_action('related_post_loop_item_element_post_excerpt','related_post_loop_item_element_post_excerpt_20200126', 10, 2);

function related_post_loop_item_element_post_excerpt_20200126($loop_post_id, $elementData) {

    //$option_id_value = isset($elementData['option_id']) ? $elementData['option_id'] : '';
    //$post_meta_value = get_post_meta($loop_post_id, 'meta_key', true);

    ?>
    Element HTML for  post_excerpt <?php //echo $option_id_value; ?>
    <?php

}