Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #213815

    Hello.

    I need some help.
    I want to add social sharing icon not post page but post list page(like masonry blog).
    but i don’t know how get the share-link each post using .

    this is a code enfold masonry_entries.php line 558~

    if(strpos($this->atts['caption_elements'], 'title') !== false){
             $markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false));
             $items .=	"<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>";
    	$items .=   "<div class='fb-share-button' data-href='' data-width='100px' data-type='icon'></div>"; <-- i need help for data-href link
    }

    Could you tell me a solution?
    Thanks.

    #214329

    Hi apptwork!

    Try following code

    
    if(strpos($this->atts['caption_elements'], 'title') !== false){
             $markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false));
             $items .=	"<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>";
    	$items .=   "<div class='fb-share-button' data-href='".get_permalink($entry['ID'])."' data-width='100px' data-type='icon'></div>"; <-- i need help for data-href link
    }
    

    Regards,
    Peter

    #214359

    Hi Peter.
    It’s great n cool.
    Thanks.

    #214384

    Hi!

    Great – glad it worked :)

    Best regards,
    Peter

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘How to add social sharing icon to each masonry blog list’ is closed to new replies.