Title: Line separating each post?
Last modified: April 25, 2018

---

# Line separating each post?

 *  Resolved [ricdam](https://wordpress.org/support/users/ricdam/)
 * (@ricdam)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/)
 * Hi there,
 * I’m currently using oceanwp, and together with the “Popular Posts” gadget, my
   website also has “Most Recent” posts gadget and “Categories” (see website).
 * Both “Most Recent” posts “Categories” gadgets have a line at the top and bottom
   of each post, which looks good because it separates each post and also gives 
   a bit of space between each other.
 * Is it possible to add these lines separating each post to the “Popular Posts”
   gadget?
 * Thanks,
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fline-separating-each-post%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/#post-10217080)
 * Hi [@ricdam](https://wordpress.org/support/users/ricdam/),
 * Of course! Try adding these styles to your theme’s stylesheet:
 *     ```
       .wpp-list li {
           padding: 6px 0;
           border-bottom: 1px solid #e9e9e9;
       }
   
       .wpp-list li:first-child {
           border-top: 1px solid #e9e9e9;
       }
       ```
   
 * When you’re done, do a “hard-refresh” on your browser (ctrl+F5 if on Windows,
   cmd+F5 if on MacOS) so it picks up this change.
 *  Thread Starter [ricdam](https://wordpress.org/support/users/ricdam/)
 * (@ricdam)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/#post-10227478)
 * Hi [@hcabrera](https://wordpress.org/support/users/hcabrera/),
 * I got the error below when adding your code to Theme functions (functions.php):
   _“
   Your PHP code changes were rolled back due to an error on line 947 of file wp-
   content/themes/oceanwp/functions.php. Please fix and try saving again. syntax
   error, unexpected ‘.'”
 * Line 947 is when your code starts.
    Any idea how to fix it?
 * Thank you very much.
 *  Thread Starter [ricdam](https://wordpress.org/support/users/ricdam/)
 * (@ricdam)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/#post-10227978)
 * Also just noticed the plugin is listing posts but also listing pages.
 * Are you able to advise how to list only popular posts, and exclude pages?
 * Thanks [@hcabrera](https://wordpress.org/support/users/hcabrera/)
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/#post-10232344)
 * Hey [@ricdam](https://wordpress.org/support/users/ricdam/),
 * > I got the error below when adding your code to Theme functions (functions.php):
   > “
   > Your PHP code changes were rolled back due to an error on line 947 of file 
   > wp-content/themes/oceanwp/functions.php. Please fix and try saving again. syntax
   > error, unexpected ‘.'”
   > Line 947 is when your code starts.
   >  Any idea how to fix it?
 * You got it wrong. The CSS code I posted above goes into **your theme’s stylesheet**,
   not into functions.php.
 * > Also just noticed the plugin is listing posts but also listing pages.
   > Are you able to advise how to list only popular posts, and exclude pages?
 * Yep! Go to **Widgets > WordPress Popular Posts** and under _Post Type(s)_ set
   the field to `post` and click on **Save** to apply changes.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/#post-10255107)
 * Marking as **resolved** due to inactivity.
 *  [adrianczw](https://wordpress.org/support/users/adrianczw/)
 * (@adrianczw)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/#post-10272527)
 * Hello, I just added the code to my site but it doesn’t separate the posts. I 
   updated in the theme CSS. And would you consider adding this to the next update?
   It’s simple but yet important visually. I would delete this now and hopefully
   you can add more options to customize the front look.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/#post-10273344)
 * Hey [@adrianczw](https://wordpress.org/support/users/adrianczw/),
 * That CSS code was specific to OP’s theme. If you want some help with your site,
   please create a new topic and share your site’s URL.
 * Also, the reason why WPP doesn’t include “options” to customize the front look
   is precisely this:
 * > I just added the code to my site but it doesn’t separate the posts.
 * I can add “options” so people can choose from them but these won’t necessarily
   fit/work on their themes as these include their own set of CSS rules that might
   break things.
 * Anyways, let’s continue the conversation on another topic.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Line separating each post?’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

 * [border](https://wordpress.org/support/topic-tag/border/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [list](https://wordpress.org/support/topic-tag/list/)
 * [styling](https://wordpress.org/support/topic-tag/styling/)

 * 7 replies
 * 3 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/line-separating-each-post/#post-10273344)
 * Status: resolved