Jump to content
Sign in to follow this  
manojgupta26

Mis-alignment of Social icons due to change post Title Length

Recommended Posts

manojgupta26

This thread is in continuation to http://www.pagelines.com/forum/discussion/17569/twitter-facebook-button-in-metabar-below-post-title#Item_14 Another issue has popped up.. See the second last post available at the homepage of my site. http://bit.ly/w9ATGW The alignment is improper if the post title is of single line..Same is the issues if the title exceeds to three lines or even more..

Share this post


Link to post
Share on other sites
Danny
Hi Mano, First thing, please don't create another topic for the same issue. It can be very confusing, a forum support mod may answer your previous topic for this issue and you may not realise it. As we have positioned it with CSS, I think the only way you're going to get perfect alignment is if all your titles are the same length, is this something that would be possible ?

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
manojgupta26
I don't agree with you Danny! How is it possible to make sure that you always write a title for two lines? This seems to be a unique Limitation with iBlogPro 5 theme...

Share this post


Link to post
Share on other sites
Simon
The limitation is you are using a fixed position from the top, so thats never going to take into account the title length. Post the code you have now and i will have a quick look. Resist the urge to start a new thread please.

Share this post


Link to post
Share on other sites
manojgupta26
Function written to add social button at homepage [code]add_action( 'the_post', 'after_post_title_social_front'); function after_post_title_social_front () { if (is_home()) { ?>

Share this post


Link to post
Share on other sites
manojgupta26
But this doesn't helped.. Catrina, The alignment issue occurs only if the post title is of single line..or if the title exceeds to three lines or even more..

Share this post


Link to post
Share on other sites
Simon
Right firstly, attaching this to the top is never going to work, as you will have different post titles, and I personally do not agree with having all these social links in the post content on the post page, people have to read an article before they can like it! But anyway, this filter does the job: [code]add_filter( 'continue_reading_link_text', 'after_post_title_social_front' ); function after_post_title_social_front () { if ( !is_home() ) return; global $post; $link = sprintf( '%s', get_permalink(), __("View", 'pagelines'), the_title_attribute(array('echo'=> 0)), ploption( 'continue_reading_text' ) ); $buttons = sprintf( ' ', urlencode(get_permalink($post->ID)), the_title() ); return $link . $buttons; }[/code] And some css: [code]/*Social Buttons Alignment at HomePage*/ .buttons-home {float:right;}[/code]

Share this post


Link to post
Share on other sites
manojgupta26
It has completely gone wrong...The button count is coming incorrect for all three buttons and the space between two posts has become zero...

Share this post


Link to post
Share on other sites
Simon
i messed up the g+ line should be: [code][/code]

Share this post


Link to post
Share on other sites
manojgupta26
I don't see any difference in the code you have posted now.. Old code new code This is getting me crazy...Can you please provide me correct working code...??

Share this post


Link to post
Share on other sites
manojgupta26
Simon, I am still waiting for your reply on this issue

Share this post


Link to post
Share on other sites
Simon
I edited my code, and gave you the change, of couse its going to look the same, i edited my own post!

Share this post


Link to post
Share on other sites
Simon
[code]add_filter( 'pagelines_excerpt', 'after_post_title_social_front' ); add_action( 'wp_head', create_function('','echo "";')); function after_post_title_social_front ( $excerpt ) { if ( !is_home() ) return; $buttons = sprintf( ' ', get_permalink(), get_the_title() ); return $excerpt . $buttons; }[/code]

Share this post


Link to post
Share on other sites
manojgupta26
Simon, It is NOT WORKING!! Both twitter and Google Plus button are not returning correct values + Lots of Layout Issue... "no SPACE" between post + Lookout the 7th Post You can check out the homepage Simon, Its been 3 days but still I am waiting for the correct code...

Share this post


Link to post
Share on other sites
Simon
Just remove the urlencode() [code]
', get_permalink(), get_the_title() );[/code] As for the position, add some top padding to the div.

Share this post


Link to post
Share on other sites
gobyfish
Brilliant, Pross. Just what I needed! You guys are top-notch!

Share this post


Link to post
Share on other sites
manojgupta26
Simon, The Like button is scrolling with redundant text....How to get rid of it? Also..I Would be really thankful if you can suggest me the right div code for top padding, you suggested me.. Regards MG

Share this post


Link to post
Share on other sites
manojgupta26
Is there someone who can help me??

Share this post


Link to post
Share on other sites
manojgupta26
Hello Simon/Pagelines Support? Is anyone looking into the issue: The Like button is scrolling with redundant text....How to get rid of it? Also..I Would be really thankful if you can suggest me the right div code for top padding, Simon suggested me..

Share this post


Link to post
Share on other sites
Simon
Maybe the code you originally used for facebook is wrong, i only copied your original code. As for the padding, you have a class dont you? .buttons-home add a margin to that.

Share this post


Link to post
Share on other sites
manojgupta26
Simon, I originally provided this code [code][/code] But you have provided [code][/code] There is a slight difference between the two.. My coded uses - [code]ID)); ?>&[/code] and you have replaced it with -> [code]%1$s&[/code] If I paste my original code, it doesn't work anymore...? Any suggestion would be of great help! Regards MG

Share this post


Link to post
Share on other sites
manojgupta26
Also the frames of different posts have stick together...

Share this post


Link to post
Share on other sites
Simon
[code][/code] Sorry, its the forum software adding ampersands everywhere.... http://pastie.org/3375733

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×