Display posts in list



Hi Miguel,

I am not sure I understand what you mean. Beans posts are stack by default, the point of the grid is to have them in multiple columns. Could you please provide a mockup of what you are trying to achieve?

Thanks,



Hi Miguel,

Here is a snippet which you may use in your child theme:

add_action( 'wp', 'example_custom_loop' );
/**
 * Custom loop output.
 */
function example_custom_loop() {
  // Stop here if we are on a single post.
  if ( is_singular() ) {
    return;
 }

 // Remove post elements.
  beans_remove_action( 'beans_post_meta' );
 beans_remove_action( 'beans_post_meta_categories' );
  beans_remove_action( 'beans_post_meta_tags' );
  beans_remove_action( 'beans_post_image' );
  beans_remove_action( 'beans_post_content' );

  // Remove post title wrapper markup.
  beans_remove_markup( 'beans_post_title' );

  // Modify markup attributes.
  beans_replace_attribute( 'beans_post', 'class', 'uk-article uk-panel-box', 'uk-margin-small-top uk-margin-small-bottom' );
  beans_add_attribute( 'beans_content', 'class', 'uk-panel-box' );

  // Move posts pagination below the panel box.
 beans_modify_action_hook( 'beans_posts_pagination', 'beans_content_after_markup' );
}

add_action( 'beans_post_title_link_prepend_markup', 'example_post_title_icon' );
/**
 * Add post title icon.
 *
 * Since this is prepended to the post title link, it won't apply to singe item which is the intended behavior.
 */
function example_post_title_icon() {
 ?><i class="uk-icon-file-text-o uk-margin-small-right"></i><?php
}

Note that the snippet above is intended to keep Beans original markup as much as possible but you could also completely overwrite the original loop with your own.

Happy coding,

Write a reply

Login or register to write a reply, it's free!