Kalin’s Post List Help


-- Download Kalin's Post List Help as PDF --


Note: I have mostly discontinued support for this plugin. If you are having problems I recommend trying Advanced Post List, which is a different, more current version of this plugin.

Kalin’s Post List allows you to create dynamic, highly customizable lists of posts and pages that can be inserted into pages and posts through a shortcode, or added to your theme through a widget or PHP snippet.

There is a wonderful tutorial to get you started at …in some weird postmodern way… written by one of my users if you find everything here a little overwhelming.

—————————–

To use one of the pre-defined Post List configurations, simply look at the table halfway down the page and copy one of the shortcodes into any page or post. When you view the post, the shortcode should be replaced with a list of posts that corresponds to the preset. You can then come back to this settings page and customize the preset, or save it as a new configuration under a different name.

    • Top Row Options
      1. Post Type: Choose to show pages, posts, custom posts, attachments or everything. Choosing ‘none’ will hide many of the list controls and allow you to use the plugin to insert HTML. All shortcodes in this mode will refer to the page you are currently viewing instead of list items. This will allow you to do things like put the same shortcode on multiple posts so you can change the content across all the posts in one edit.
      2. Show Count: The number of items that will be shown. Be sure to only insert integer numbers here. Use -1 (negative one) for no limit.
      3. Order by: Choose from 8 different ways to order the posts, then select ascending or descending. These will affect which posts are actually shown if the number of results is higher than the Show Count.
      4. Parent: This dropdown will appear if you select ‘page’, ‘all’ or a custom post type, allowing you to choose a page to show only the children of that page.

 

    • Categories and Tags
      1. Include current post categories/tags: Checking this for either categories or tags will extract the terms from the current page/post where you have applied the shortcode, and use them to determine which posts to pull into the list. This is how you can show “related posts”.
      2. Require all selected categories/tags: A normal WordPress post query returns posts that have any one of the selected tags or categories. Checking this box will tell Post List to ensure that every post contains every selected tag or category.
      3. Category/Tags: Your own categories and tags should show up in these two lists, allowing you to select any combination. If you selected “include current”, these will be added to the list.

 

    • Content
      1. Before list HTML: Insert any HTML to be displayed immediately before the actual post list. Shortcodes in this section refer to the main page you are currently viewing.
      2. List item content: This is the important one. This HTML represents the individual items within the list and will be repeated multiple times based on the “show count” and the number of results returned. You must use the shortcodes listed further down on the page to insert information about each post. Most common, of course would be [post_title] and [post_permalink] shortcodes, but you’ll see that there are many others, allowing you to customize the information displayed in the list. For examples on how these are used, click “load” on any preset in the preset table below.
      3. After list HTML: HTML content to insert after the list. Shortcodes refer to page you are sitting on just like Before list HTML.
      4. Exclude current post from results: Check this to exclude the page/post you are currently viewing from the list, since there’s usually no reason to link a page to itself.

 

    • Presets:
      1. Save to Preset: You can save a preset to any name you like, though avoid special characters. Once you save, the preset should immediately appear in the list below. You can save over the default presets, though you may be better off saving them as unique names to avoid confusion later.
      2. Post List Preview: If you select ‘show preview’, then save the preset, you will see the actual post list generated in the preview area so you can quickly see what your list will look like. Bear in mind that the CSS in your admin is different from your theme, so colors and other formatting may be a little different when placed within your theme or post. Also remember that the Post List admin page is not a post, so if you have selected ‘include current post categories/tags’ or ‘exclude current post’, the correct posts will not be shown in this preview.
      3. Preset List Table: The preset list table should show all of the presets you’ve entered as well as any remaining defaults that shipped with the plugin. You should see load and delete buttons for each. Clicking load should populate all the above fields to allow you to make adjustments and re-save. Delete will delete that preset. The right-most cell contains the shortcode itself for easy copy/pasting into your post.
      4. Restore Preset Defaults: To restore your original presets, click “Restore Preset Defaults” under the preset list. This will restore your original presets, overwriting any changes you have made to them. This will not, however, delete any new presets you’ve created using unique names. If I add new default presets to the plugin, such as the CSSTable preset added with version 3.0, you will need to click this button to see them.
      5. PHP code: For folks with a working knowledge of PHP or themes. When you click load on any preset, it will generate a simple PHP snippet that you can insert anywhere into your theme. Don’t forget the opening and closing PHP tags.

 

    • Shortcodes:This is a reference list of the shortcodes that can be used within the “List item content” input field. They will refer to each respective post in the generated list. If used within the Before or after list HTML fields, these shortcodes will refer to the page you are currently viewing.
      • Note that some shortcodes have optional parameters, offering greater customization.
      • The [post_pdf] shortcode will give you the url to create a PDF file of the appropriate page. This requires Kalin’s PDF Creation Station WordPress plugin to be installed and activated to function properly. The url generated runs through the PDF creation script. If you want the URL directly to the PDF simply do something like this {hard coded path to pdf folder}[post_name].pdf or {hard-coded-base-path}[ID].pdf, depending on how you have your PDF filenames set up.

 

  • Plugin deactivation:At the bottom of the page, you can select whether or not to save all your values when deactivating this plugin. If you have lots of custom presets that you don’t want to lose, you may want to turn this off. Otherwise the default is to clean up everything upon plugin deactivation.

Leave a Reply

Your email address will not be published.

KalinBooks.com is the ramblings of Kalin Ringkvist, a science fiction author with a passion for peace and freedom.