Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #375400

    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;
    }
    #375804

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.