Associated Posts

The award-winning Associated Posts Lite (formerly Post Page Associator) Plugin enables you to display posts on a page.

Author:Dennis Hoppe (profile at wordpress.org)
WordPress version required:3.3
WordPress version tested:3.8.1
Plugin version:1.0.13
Added to WordPress repository:25-10-2012
Last updated:09-03-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:83
Rated by:38
Plugin URI:http://dennishoppe.de/en/wordpress-plugins/as...
Total downloads:22 934
plugin download
Click to start download

Associated Posts enables you to associate posts and pages with each other and to display posts on any pages. You can easily select posts in the "Edit Page" Mode and attach them to this page. Associated Posts Lite is the subsequent version of "Post Page Associator".

Btw: Associated Posts is available as Premium Plugin too.

Handling

The handling is very easy. When you are going to edit a page you will see a box with the title "Associated Posts". There you can choose posts which should attached to this page. In this version you cannot set the number of posts which should be shown on the page or other settings like the post order. These options are available in the Pro Version.

Settings

You can change the association settings in WP Admin Panel » Settings » Associated Posts.

Shortcode

In case you won't have the associated posts at the end of your page you can use the [associated_posts] shortcode anywhere in your pages content. So the posts will be shown at the place you inserted the shortcode. (The shortcode has no parameters.)

Customization

If you need a customized template of the associated posts. E.g. as list or with author, date, time or meta data feel free to send me an e-mail. For a small fee I will write a customized template for you. Don't be shy. 😉

How to write an own customization

A template is a php file which renders the output of the associated posts (a WP Query). You can find example template files in the plugin folder (templates/). You can store these templates in:

  • plugin templates folder (or a sub folder) (inadvisable)
  • your theme folder (or a sub folder)

The default header of a template looks like that:

/*
AP Template: Example Template
Description: This is the description.
Version: 1.0
Author: Your name
Author URI: http://example.com
Author E-Mail: yourname@example.com
*/

The only required information in the header is the "AP Template" line. So the Plugin knows this is an AP Template. Please notice that your template will be removed within the next plugin update if you place somewhere inside the plugin folder.

For Theme Designers

Feel free to create a template and add it to your theme. The plugin will find it automatically. You can find a working example file of a template in the plugin directory (templates/title-excerpt-thumbnail/title-excerpt-thumbnail.php). Just copy it in your template directory and modify it until it fits your themes design.

If you want to disable the auto append feature of the plugin you can use the 'associated_posts_auto_append' filter. Just add this line of code to your functions.php:

Add_Filter ('associated_posts_auto_append', Create_Function('',' return False; ') );

For real developers 😉

As a real developer you can easily access to the associated posts via functions:

Global $wp_plugin_associated_posts;
$wp_plugin_associated_posts->Get_Associated_Posts ($page_id = Null){
/* $page_id: the id of the page which associated posts you want to read.
             if $page_id = Null, the plugin will read from current page.

   returns:  By default the function returns a WP_Query Object.
             The object is very well documented in the Codex.
             If there are no posts this function returns false.
*/
}

Real developers love the clout of their code. And as a real WordPress developer you know about the magic of hooks and filters. The Associated Posts Plugin uses a filter with the name 'associated_posts_template'. You can use this filter to set the template file of the associated posts. (You can overwrite the users template option with this filter.) You can find an example file of this template in the plugin directory (templates/title-excerpt-thumbnail.php).

Questions

I know you have many questions – my mailbox is the proof. 😉 But unfortunately I cannot give support for free plugins. There is a separate support package available for the Pro Version of this plugin. Please use it. Of course you can hire me for consulting, support, programming and customizations at any time.

In the Press

Language

  • This Plugin is available in English.
  • Dieses Plugin ist in Deutsch verfügbar. (Dennis Hoppe)
  • Cette extension est disponible en Français. (Quentin Turquet)
  • Dette plugin er tilgængelig på Dansk. (Thomas Jensen)
  • Este plugin está disponible en Español. (David Sánchez)

Translate this plugin

If you have translated this plugin in your language feel free to send me the language file (.po file) via E-Mail with your name and this translated sentence: "This plugin is available in %YOUR_LANGUAGE_NAME%." So I can add it to the plugin. Of course you get a backlink to your website!

You can find the Translation.pot file in the language/ folder in the plugin directory.

  • Copy it.
  • Rename it (to your language code).
  • Translate everything.
  • Send it via E-Mail to <Mail [@t] DennisHoppe [dot] de>.
  • Thats it. Thank you! =)

Frequently Asked Questions

I am still collecting frequently asked questions. 😉