Add custom post info to Enfold's masonry template

This topic contains 17 replies, has 5 voices, and was last updated by  Irth Orbits 10 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #23360

    Irth Orbits
    Free User
    Post count: 5

    Why would Stiofan’s suggestion, geodir_get_post_info($entry[‘ID’]);, return ‘0’?
    ($entry[‘ID’] is obviously the post id)

    #23429

    Paolo
    Site Admin
    Post count: 31206

    Because you didn’t do what Stiofan told you to do…

    What you need to add around line 598 is:

    
    
    $post_details = geodir_get_post_info($entry['ID']);
    			 print_r($post_details); 
    

    This will display (print) in that page the array with ALL information for each post.

    You will notice that the address is under [post_address].

    So if you comment out the print and add

    $post_details->post_address;

    to a

    $items

    var it will display the address below the excerpt.

    Example:

    
    
    	//title and excerpt
    if($this->atts['caption_elements'] != 'none' || !empty($text_add))
    {
    $items .=	"<figcaption class='av-inner-masonry-content site-background'><div class='av-inner-masonry-content-pos'><div class='avia-arrow'></div>".$text_before;
    if(strpos($this->atts['caption_elements'], 'title') !== false){
    $markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false, 'id'=>$entry['ID'], 'custom_markup'=>$this->atts['custom_markup']));
    $items .=	"<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>";
    }
    if(strpos($this->atts['caption_elements'], 'excerpt') !== false && !empty($content)){
    $markup = avia_markup_helper(array('context' => 'entry_content','echo'=>false, 'id'=>$entry['ID'], 'custom_markup'=>$this->atts['custom_markup']));
    $items .=	"<div class='av-masonry-entry-content entry-content' {$markup}>{$content}</div>";
    }
    $items .=	$text_after."</div></figcaption>";
    }
    $items .= "</figure>";
    $items .= "</{$html_tags[1]}><!--end av-masonry entry-->";
    }
    $post_details = geodir_get_post_info($entry['ID']);
    			 //print_r($post_details); 
    $items .=	$post_details->post_address;

    Follow above example and continue.

    Thx

    #23451

    Irth Orbits
    Free User
    Post count: 5

    Ah brilliant, sorry for the annoyance but thanks for the assist!

Viewing 3 posts - 16 through 18 (of 18 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount