An update on this is I managed to create a function which hooks onto the loop-markup.php file. It currently adds the custom html under the title. Do you know how I hook it on to show before the title:
/** * Add Read More button after meta-date in post grid */ function custom_postdata($postdata_markup, $post_type) { global $post; $price = get_field('price', $post->ID); // Get the 'price' field value $status = get_field('status', $post->ID);
Yes, if you add the empty function it would not show anything therefore you need to copy paste the whole function with the code and make the needed changes to it.
Hi,
I'm trying to override this file in my child theme:
wp-content/plugins/salient-core/includes/post-grid/loop-markup.php
I've tried adding it to /vc_templates and /post-grid in the child theme but no luck.
I saw this ticket
https://themenectar.ticksy.com/ticket/3038136/
But when I add the function the grid template disappears from the front end. C
Could you help.
Thanks
Hi,
An update on this is I managed to create a function which hooks onto the loop-markup.php file. It currently adds the custom html under the title. Do you know how I hook it on to show before the title:
/**
* Add Read More button after meta-date in post grid
*/
function custom_postdata($postdata_markup, $post_type) {
global $post;
$price = get_field('price', $post->ID); // Get the 'price' field value
$status = get_field('status', $post->ID);
$postdata_markup = '
<div class="data-row">
<div class="data-price">' . esc_html($price) . '</div>
<div class="data-availability">' . esc_html($status) . '</div>
</div>
';
return $postdata_markup;
}
add_filter('nectar_post_grid_excerpt', 'custom_postdata', 10, 2);
Hey Again,
Yes, if you add the empty function it would not show anything therefore you need to copy paste the whole function with the code and make the needed changes to it.
Thanks.
ThemeNectar Support Team