Skip to content
Victor Jonsson edited this page Sep 5, 2013 · 6 revisions

You can modify the functionality of the post search in the list manager. This is example code makes it possible to choose whether or not to display posts written by the author Johnny when searching for posts in the list manager.

<?php
function my_post_search_hook() {
    arlima_modify_post_search('my_post_search_form', 'my_post_search_modification');
}
add_action('arlima_post_search', 'my_post_search_hook');

function my_post_search_form() { ?>
    Exclude posts written by John
    <input type="checkbox" name="exclude_johnny" value="1" />
<?php }

function my_post_search_modification($args, $posted_data) {
    // http://codex.wordpress.org/Template_Tags/get_posts
    if( isset($posted_data['exclude_johnny']) ) {
        $args['author'] = '-'.get_user_by( 'login', 'johnny' )->ID;
    }
    return $args;
}

This Wordpress plugin was created by Swedish newspaper Västerbottens-Kuriren to give its editorial staff an easy to use tool for customizing the front pages of their online magazines.

Installing Arlima

  1. Download the latest release from github and unzip the folder in your plugin directory.
  2. Open up wp-admin and activate the plugin.
  3. Go to "Article lists" -> "Edit lists" in wp-admin and create your first article list.
  4. Open up a page (or create it) in wp-admin. Down to the right you will see a meta box labeled "Arlima" where you choose the list that you created on step 2.
  5. Go to "Article lists" -> "Manage lists" and start stuffing your article list with interesting content.

Top links

Clone this wiki locally