June 15, 2014

Textual description of firstImageUrl

How To Centralize LinkWithin Related Posts Widget In PR News Theme

|

 The other day I was trying to centralize LinkWithin thumbnails in one of my WordPress sites using PR News theme. I tried adding the tags <center> and </center> within the provided code, but it could not work.

After trials and errors, I managed to get LinkWithin thumbnail centralized under the blog post.

This is how I do it with PR News theme of WordPress:

1. Go to post-content.php.

2. Scroll down until you see this code:

<li class="next"><?php next_post_link('%link', __('%title <i class="icon-chevron-sign-right"></i>', 'prnews')); ?></li>

3. Right after </li> add this code:

<center><div class="linkwithin_div"></div></center>

4. Then only add the Linkwithin code provided.

<script>
var linkwithin_site_id = XXXXXXX;
</script>
<script>linkwithin_text='Related Posts:'</script>
<script src="http://www.linkwithin.com/widget.js"></script>
<a href="http://www.linkwithin.com/"><img src="http://www.linkwithin.com/pixel.png" alt="Related Posts Plugin for WordPress, Blogger..." style="border: 0" /></a>

How To Get This set of code


When you go to LinkWithin.com to get the widget, set the Platform options to 'Other' as shown below:

how to setup linkwithin widget for blogger

Note:

I have modified or rather added this line: <script>linkwithin_text='Related Posts:'</script> into the code.


The original code does not have this line. I did it because I wanted the title to be 'Related Posts' and not the default (original) line: 'You might also like'.

 5.  So the complete thing should look like this:

<li class="next"><?php next_post_link('%link', __('%title <i class="icon-chevron-sign-right"></i>', 'prnews')); ?></li> 
<center><div class="linkwithin_div"></div></center><script>
var linkwithin_site_id = XXXXXXX;
</script>
<script>linkwithin_text='Related Posts:'</script>
<script src="http://www.linkwithin.com/widget.js"></script>
<a href="http://www.linkwithin.com/"><img src="http://www.linkwithin.com/pixel.png" alt="Related Posts Plugin for WordPress, Blogger..." style="border: 0" /></a>

6. Click "Update File" button.

Note: Similarly, this is what I have done to  this blog. The three thumbnails are centralized and I have replaced it with "More Posts Here". See below this post.