Hi, I have successfully been able to use masonry in avia layout editor with custom post type. But I would like to customize title display, and I use the function below. Is there another method than looping all entries at each entry display to modify the title ? code below , thanks.
add_filter('avf_masonry_loop_prepare','breizhwave_memberTitle', 10, 2);
function breizhwave_memberTitle($loop, $entries)
{
foreach($entries->posts as $key => $entry)
{
$id=$entry->ID;
if ($id=$loop["ID"])
{
if($entry->post_type == "membre")
{
$ville=get_post_meta($id,"ville",true);
$loop['the_title'] = "<b>". get_the_title($id) . "</b>" . " " .$ville;
}
}
}
return $loop;
}
Hi erwanpia!
That looks like it would be the best way. You can add it to a child theme so it is saved between updates.
Cheers!
Elliott