2016-11-23 2 views
0

Ich möchte benutzerdefinierte Post vorgestellten Bild, Titel und kleinen Inhalt von Post-Text teilen. Wie kann ich das machen? Ich habe versucht, es mit sharethis WordPress-Plugin zu tun, aber es teilt das Logo meiner Website und nutzlosen Inhalt. Das ist mein Code, bitte hilf mir.WordPress Custom Post Ausgewähltes Bild, Titel und Inhalt Social Media Sharing

Dies ist mein Code einzelnen Beitrags:

<div class="row"> 
<!-- Sidebar --> 
    <aside class="col-sm-4 sidebar sidebar-right"> 
     <?php require_once('template/advertisment/postview_side_advertisment.php'); ?> 
     <?php require_once('template/postview/side_recentpost.php'); ?> 
    </aside> 
    <!-- /Sidebar --> 
    <!-- Article main content --> 
    <article id="post-<?php the_ID(); ?>" class="col-lg-8 col-md-8 col-sm-12 col-xs-12 maincontent"> 
     <?php 
     setPostViews(get_the_ID()); 
     ?> 
     <?php while (have_posts()) : the_post(); ?> 
      <h1 class="inner-page-header"><?php the_title(); ?></h1> 
      <h4> 
       <?php echo get_the_date("F j, Y g:i a", $post_id); ?> 
      </h4> 
      <h5><?php 
       echo getPostViews(get_the_ID()); 
       ?></h5> 
      <div class="social-sh col-lg-12 col-md-12 col-sm-12 col-xs-12"> 
        <span class='st_facebook_large' st_title='<?php the_title(); ?>' 
          st_url='<?php the_permalink(); ?>'></span> 
        <span class='st_googleplus_large' st_title='<?php the_title(); ?>' 
          st_url='<?php the_permalink(); ?>'></span> 
        <span st_via='@saruwathlk' st_username='saruwathlk' class='st_twitter_large' 
          st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span> 
        <span class='st_linkedin_large' st_title='<?php the_title(); ?>' 
          st_url='<?php the_permalink(); ?>'></span> 
        <span class='st_blogger_large' st_title='<?php the_title(); ?>' 
          st_url='<?php the_permalink(); ?>'></span> 
        <span class='st_flipboard_large' st_title='<?php the_title(); ?>' 
          st_url='<?php the_permalink(); ?>'></span> 
      </div> 
      <hr style="margin-top:9px; margin-bottom:0px"> 
      <?php echo the_content(); ?> 
     <?php endwhile; // end of the loop. ?> 
    </article> 
    <?php echo the_title(); ?> 
    <?php echo the_permalink(); ?> 
</div> 

Antwort

Verwandte Themen