Jump to content
Sign in to follow this  
dawudraamah

Place 3 or 4 blog post in the same row for pagelines framework 2.0 and above

Recommended Posts

dawudraamah

I was looking everywhere for a solution to place 3 or 4 blog post in the same row for pagelines framework 2.0 and above, however nothing worked. I used the solutions that I found with older versions such as Platform pro and Platform base and they work just fine (eg. changing the template.postloop.php, but again when trying those same suggestions with the Pagelines framework 2.0 above those solutions would not work, they only broke my site with a fatal call error, The greatest number of post I could get with Pageslines framework 2.0 and above with those solutions was 2 post in a row. This said, this meant the script had to be somewhere in the pagelines framework theme folder. Here is where I found the script: themes/pagelines/includes/class.posts.php -These are the lines that you need to be change line 28 $this->clipcount = 2; // The number of clips in a row line 61 $clip_row_start = ($this->clipcount % 2 == 0) ? true : false; line 62 $clip_right = ( ($this->clipcount+1) % 2 == 0 ) ? true : false; -change to: line 28 $this->clipcount = 3; // The number of clips in a row line 61 $clip_row_start = ($this->clipcount % 3 == 0) ? true : false; line 62 $clip_right = ( ($this->clipcount+1) % 3 == 0 ) ? true : false; only change the numbers and nothing else!!! ------------------------------------------------------------------------------------------------------------------ -CSS: courtesy of @ricardo -Place this CSS into the custom code override area ( note this css is for 3 clips) ( for 4 clips the % would be 23-25% whatever you like.) 5 clips do the math :) /* Multi Clips */ #pagelines_content .clip, #buddypress-page .clip{ width:23%; } #site.fullwidth #pagelines_content .clip, #site.fullwidth #buddypress-page .clip{ width: 24%; } --------------------------------------------------------------------------------------------------------------------- Note this is a hack solution, so when upgrading you may have to alter the file again. I hope this helped. Have a great day

Share this post


Link to post
Share on other sites
dawudraamah
One more suggestion. I believe The multiple post in a row will only work when full post is set to zero. Play with the settings in pagelines blog and post section.

Share this post


Link to post
Share on other sites
dawudraamah
UPDATE Note: In Pageline 2.2 you will need to play around with the code. IIf you want 3 post in a row then change all the numbers to 4 example: line 21 $this->clipcount = 3; // The number of clips in a row line 135 $clip_row_start = ($this->clipcount % 3 == 0) ? true : false; line 136 $clip_right = ( ($this->clipcount+1) % 3 == 0 ) ? true : false; ------------------------------------------------------------------------------------------------------- the new pageline code forces an uneven alignment CSS add to space clips properly. .hentry-pad { padding: 10px 10px 25px; } I am sure there is a better hack out there but this is what I have found.

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  

×