Dennis Hoppe

selbständiger Entwickler / Unternehmer / Student aus Berlin; schreibt über PHP, JavaScript, WordPress, jQuery, CodeIgniter, GTK und mehr.
Sie sind hier:  Plugins  →  Post-Page-Associator

Post-Page-Associator

Mit dem Post-Page-Associator Plugin lassen sich, wie der Name schon vermuten lässt, Artikel mit Seiten assoziieren und Kategorien an Seiten binden.

Die Handhabung ist dabei denkbar einfach. Sobald Sie das Plugin aktiviert haben und eine Seite bearbeiten oder neu erstellen, erscheint eine Zusätzliche Eingabemaske mit dem Titel ”Associate posts with this page” (dt. “Artikel mit dieser Seite assoziieren”).

Sie wählen die Kategorie welche die zu verknüpfenden Artikel enthält und legen fest wie viele Artikel der Kategorie gezeigt werden sollen. Standardmäßig werden alle Artikel gezeigt und chronologisch absteigend sortiert (Neueste Artikel oben).

Hilfe! Es geht nicht!

Beim ansehen der entsprechenden Seite stellen Sie möglicher Weise fest das keine der angehängten Artikel zu sehen sind. Vermutlich unterstützt Ihr Theme keine “associated posts”. Dem Problem lässt sich einfach Abhilfe schaffen: Setzen Sie in Ihrem WordPress Administrationsbereich unter Einstellungen -> Lesen einen Hacken bei Assoziierte Artikel und aktivieren Sie die Option “Mein Theme unterstützt keine assoziierten Artikel. Hänge die Artikel an das Ende der Seiten an”.

ShortCode

Das Plugin stellt den ShortCode [ associated_posts ] zur Verfügung um die angehängten Artikel auch in Themes darzustellen welche keine Unterstützung für Associated Posts mitliefern. Mit dem ShortCode können Sie an einer beliebigen Stelle in einer Seite eine Liste der mit der Seite verbundenen Artikel einfügen. Der ShortCode wird normaler Weise nur einmal interpretiert da es keinen Sinn macht die selbe Liste an mehreren Stellen der Seite darzustellen. Sollten Sie trotzdem den Wunsch haben mehrere Artikelauflistungen einzufügen können Sie die Code mit dem Parameter “enforce” erweitern und die Darstellung erzwingen. (z.B. [ associated_posts enforce ])

Theme Entwickler

Das Plugin richtet sich auch an Theme Entwickler. Um dem Plugin mitzuteilen dass Ihr Theme Associated Posts unterstützt können Sie die Funktion add_theme_support() verwenden. Der Funktionsaufruf sollte am Anfang der functions.php erfolgen.

1
add_theme_support('associated_posts');

Damit wird vor dem Benutzer im Backend die Option “Mein Theme unterstützt keine assoziierten Artikel. Hänge die Artikel an das Ende der Seiten an.”  versteckt. Über die in der Plugin Klasse enthaltene Funktion get_associated_posts() können Sie auf die angehängten Artikel zugreifen.

1
2
3
4
5
6
7
8
wp_plugin_associate_posts_and_pages::get_associated_posts ($post_id = Null, $limit = Null){
/* $post_id: the id of the page which associated posts you want to read.
             if $post_id = Null, the plugin will read from current page.
   $limit:   the number of associated posts you want.
             if $limit = Null you will get as many posts as the user set up in the backend.
   This function return an get_posts() result array().
*/
}

Download

Weitere Informationen und den Download zum Plugin finden Sie hier:  Post-Page-Associator Plugin von Dennis Hoppe.

Ich führe zu diesem Plugin einen Changelog in welchem ich alle Änderungen der Versionen protokolliere: Changlog des Post-Page-Associator Plugins.

Unterstützen

Sie mögen dieses Plugin? Warum nicht einige der folgenden Dinge tun!?

  • Verlinken Sie es damit auch andere davon erfahren.
  • Bewerten Sie es in Plugin Verzeichnissen damit andere es einfacher finden.
  • Spenden Sie eine Kleinigkeit als Wertschätzung für meine gute Arbeit  

Weitere Meinungen

Sie können der Diskussion zu diesem Beitrag über den RSS 2.0 Feed folgen.

Sie können zu diesem Artikel einen Kommentar schreiben oder einen Trackback von Ihrer eigenen Seite setzen.

Kommentare

  • 17. Januar 2010
    Hi Dennis, Looked at your page-post plugin. It's great, but not sure I am using it right? (using standard theme, wp 291) I am getting Category heading, then "associated post" under a page , but just a link to the post, not the actual text of the post. Is this working right? (for example of what I want, see the website for sailing club - each web page is made of a "page" and then posts underneath, but my own code only working with WP 2.2) Best Regards ChrisH
    • 17. Januar 2010
      Hey Chris, in the current version (version 1.1) you can show an excerpt and a thumbnail to each associated post. May this helps you. Don't forget to give a good rating on wordpress.org if you like this plugin. ;)
  • Scott Leslie
    17. Januar 2010
    How do you include excerpt of the post? running 1.1
    • 17. Januar 2010
      Hi Scott. To activate the excerpt go to WP Admin Panel -> Settings -> Reading -> Associated posts and check the box "Show an excerpt of the associated posts". I hope thats what you want to know. ;)
  • Scott Leslie
    17. Januar 2010
    Thanks - sorted now. Thanks
  • 18. Januar 2010
    Hi Dennis - I am not seeing anything on my pages. I have activated the plugin and am able to select the category and the number of posts when I edit pages. I have checked 'My theme doesn't support posts', etc. and tried selecting 'Excerpts', etc. Do I need to use the associated_posts enforce shortcode? I am not sure where or how to place it, i.e. what is the full code to make this work and does it go into a template or each page? I'm just receiving fatal error codes at the moment. Thanks in advance :)
    • 18. Januar 2010
      Hi Kathryn, thanks for your message. I found the problem and fixed it. So please try Version 1.1.1. By the way: if you check "My theme doesn't support posts" you haven't to use the ShortCode because the plugin adds the ShortCode to your posts. ;)
  • 18. Januar 2010
    Hey there! Love your plugin; well, the idea, since it does not work now ;) I use greenpark 2. If I follow your instructions and tick "my theme does not ..." and click "save changes", the box is unticked again, and the plugin does not work. Any suggestions? Thanks!
    • 18. Januar 2010
      Hey Thomas! I tested it with WordPress 2.9.1 and GreenPark 2 and can't find a bug. Did you try to deactivate all other plugins to find any incompatibilities?
  • 18. Januar 2010
    It's a great plug in and its definitily a lot more convenient than the other ones. Everything shows up except the thumbnails for the posts, I've got it checked for it to show but no thumbnails.
    • 18. Januar 2010
      Hey Yung, the thumbnail function is for themes which support post thumbnails. If your theme does not support that the plugin looks for the attached images and choose a random one. Be sure to attach a image to your post which can be used as post thumbnail.
  • 19. Januar 2010
    Hi Dennis, Well done with the update 1.1.1 - seems to run well. I have not tried the new thumbnail option yet, but am sufficiently impressed to tick it on plugin site and send you a small donation. Keep up the good work Chris H
    • 19. Januar 2010
      Chris! Thanks for your donation. Also the small donations help to make my work better. :)
  • 21. Januar 2010
    Hi Dennis, I'm using WP 2.8.6 (and cannot upgrade because of server restrictions so far) and the plugin doesn't save its options under Settings > Writing. Once you save, the checkbox get unticked again. I would like to make use of the excerpt option. Thanks!
    • 21. Januar 2010
      Hey Matt. The plugin should support WordPress 2.8.6. But i added some work arounds in the new version for better PHP-Supporting. Please try the new one.
    • 21. Januar 2010
      Sorted : I commented the conditional statement, works like intended now.
    • 21. Januar 2010
      hehe, modifying my code and then saying the plugin does not work is not funny! ;) :P
  • 21. Januar 2010
    hi, dennis 3 questions: 1) rather than just showing an excerpt, i would rather show the entire post. how could i accomplish that? 2) i don't want the post to appear in two times - i only want the post w/ a category of news to appear on a page called news. i don't want it to appear in the blog page as well. 3) what piece of code indicates if my theme uses associated posts? i'm using Kubrick in 2.9.1. thank you much, dennis.
    • 21. Januar 2010
      Hi Sergi, in the new version you can show the full content of the posts. At the moment you cannot exclude posts from the listing, sorry. The plugin shows all posts in the category you choose. If your theme calls the function add_theme_support('associated_posts'); then it supports associated posts. ;) Kubrik does not support associated posts. But i hope there will be more themes in the future that support this. My new Sandfish Theme supports it. ;)
  • 22. Januar 2010
    thanks much for your reply, Dennis!
  • 23. Januar 2010
    Dennis, This is a really fantastic plug-in! Exactly what I have been looking for. I just have one question about configuring the style of the posts that are displayed. I have the plug-in set to display the full post content. The post content retains its original formatting/styling, and appears just at it does on the main blog, but the post titles are displayed in a much smaller font.is there anyway to edit the styles of post the titles etc. that are displayed by the plugin, I wasn't sure where to find the CSS that applied to this. If you have any suggestions I would really appreciate it. thanks!
    • 23. Januar 2010
      Hey Luke! Thanks for the good feedback. I thought about your formating problem and in the end i decided to add an option to the backend that enables you to set the header tags for the posts. Please try the new version (1.1.4). If you like this plugin please give a good rating at wordpress.org and/or send me a small donation. ;)
  • 23. Januar 2010
    In response to Sergi: there are several good quality plug-ins that make it easy to exclude certain posts from showing up on your main blog page. plug-in called "Simply-Exclude" allows you to selectively include or exclude categories, tags, and pages from showing up on your front page, archives, etc. This plug-in works perfectly along-side "Page-Post-Associator." If you want posts of a particular category (news) to be displayed on their own separate page, you can then exclude that category from your main blog feed.
  • 23. Januar 2010
    ditto luke question - 23 jan how are styles assigned to results I get unordered list format and I do not want to display the post category Great plug-in - this could make my life so much easier - if I can get the results to display properly Thank you!
    • 23. Januar 2010
      Please check the new version (1.1.5). There you can set the head tags and you can hide the category name header. If the plugin could make your life so much easier think about a donation ;)
  • 24. Januar 2010
    Hi Dennis, I am trying to make the plugin work, but it doesn't show anything in the 'edit page' page. I use the last version and activated it, but what do I have to do make it work with my theme, Sliding door. I already ticked the box of my theme doesnt support associated posts. Thanks in advance
    • 24. Januar 2010
      I cannot imagine that. I downloaded and checked my plugin with Sliding Door. No problems. Every thing works fine. Some question: Did you activate the associated post box? (On top of your admin panel in "edit page" mode there is a small button: "Screen Options". Click it and tick "Associate posts with this page")
  • 28. Januar 2010
    Wow, thank you for the fantastic update! The added option to set the header tags for the post titles on the display page works perfectly. this completely resolved the difficulties that I was having with formatting. Also, the option not to show the category-title as a header on the display page is very helpful. This is really a great plug-in! This is by far the best plug-in available for creating multiple pages that displays category specific posts. And with the new features, the post-pages can be easily formatted to fit seamlessly with the overall design of the site. Thank you again for putting out this latest update, and for all your work developing this plug-in! it was very much appreciated!
    • 28. Januar 2010
      Thanks. I think you know how you can support me and my work ;)
  • 28. Januar 2010
    Hi Dennis Your plugin works better than others and much easier - set in one of their blogs Thanks!
    • 28. Januar 2010
      Thanks for your Feedback. If you like this plugin please give a good rating at wordpress.org or send me small donation. =)
  • Bryan
    28. Januar 2010
    I don't see the button on my settings page to make the change...
    • 28. Januar 2010
      The Settings for the associate_posts shortcode can you find in WP Admin Panel -> Settings -> Reading. And the associated posts can be set in "edit page" mode of each page.
  • Bryan
    29. Januar 2010
    Thanks, that was an easy fix... another Q, though... what can I do to remove the bullet points that show up next to each article?
    • 29. Januar 2010
      Hey Bryan, to hide the bullets add this css code to your page: ul.associated-posts { list-style-type: none; } If you want i do that for a small donation. Just send me a login to your page so i can edit your theme.
  • 29. Januar 2010
    Can you tell me where to add: ul.associated-posts { list-style-type: none; Also, Is there a way to make the post appear on the page exactly using the same style as on the front page? I could make a small donation for some help with this one. :) Thanks!
    • 29. Januar 2010
      Hi Jordan. The easiest way to include the CSS code is to copy this line ul.associated-posts { list-style-type: none; } in your style.css theme file. If you want to have the look and feel of the associated posts from the front page your theme has to support associated posts. I can upgrade your theme if you want. Let me know...
  • 29. Januar 2010
    Can you show me how to update my functions.php file? What exactly should I add to it? Thanks for the help!!!
    • 29. Januar 2010
      You shouldn't modify the functions.php. You should update the style.css. And if you want to upgrade the theme you have to modify the page.php in the theme directory. But this requires a lot of PHP and WordPress KnowHow.
  • 02. Februar 2010
    Hi Dennis, I got a big problem. My blogsite is not not working now. My fault. I put this line of php script at the very bottom of the functions.php
    add_theme_support('associated_posts');
    Sorry I am total not knowledgeable in php. Now I got this error when I tried to change themes. Warning: Cannot modify header information - headers already sent by (output started at /home/stephe65/public_html/chainlinkfencer.com/wp-content/themes/js-o4w/functions.php:66) in /home/stephe65/public_html/chainlinkfencer.com/wp-includes/pluggable.php on line 868 1. What shall I do to restore this condition? 2. Where should I put that line of script in the functions.php rightly? Help!
    • 02. Februar 2010
      Remove the code from your functions.php and restore the original one. If you are not able to do that send me login. I will repair this for a few euro. But i do not see what you are going to do. The theme Js O4w doesn't support associated posts. Why wanted you to add the line of code to the functions.php ???
  • 02. Februar 2010
    Hi Dennis, Thanks for the quick response. I can not access dashboard through wp-admin now. 1. Shall I remove the scripts in cpanel for the functions.php file? 2.Where can I get the original functions.php? Is it from the original theme Js 04w that is untampered? Glad for the assurance of helping. STEK
    • 02. Februar 2010
      Copy the functions.php from the original theme via ftp on your server. So it should run as usual.
  • 06. Februar 2010
    Den - I followed all the instructions and I assigned a page to a specific category and I assigned my newest post to that specific category. Still the post appears, not only on the specific page (which is correct), but also on my front page (which is not correct). Any idea why this is happening?
    • 06. Februar 2010
      Hey Dick! If you set up in your WordPress Admin Panel > Reading > Front page displays: "Your latest posts" of course you will see the post on your front page. Otherwise (your front page is a real page) you ticked the box "My Theme does not support associated posts. " or you added the ShortCode to the page. Please recheck these options and give me a feedback.
  • 06. Februar 2010
    Dennis - here are my settings in reading: front page displays a static page. However this page can NOT be selected because it does NOT exist in the drop down box. But the setting is static display. Apparently the homepage is NOT considered as a page. So you might say that static is "HALF" set and not really complete. Then my theme does not support is unchecked. By the way thanks for your quick response!
    • 07. Februar 2010
      So i think your theme puts your posts on the front page. Thats not a bug of the plugin.
  • 10. Februar 2010
    Hi Dennis - great plugin! I have a short question though - I want to add the plugin to my homepage - http://allsports.bg (I am using a page as a home page) and I want it to display a list of posts from all categories. Is there a way I can do that? I am sorry I cannot make a donation at this time but if my website succeeds - that's the first thing I'll do ;)
    • 10. Februar 2010
      Hey Anton, if you want to show a list of all posts there is no reason to use the post-page-associator. You should use the "latest post"-Widget or something similar. Post Page Associator Plugin does not support multiple categories on one page. sorry.
  • 10. Februar 2010
    Thanks for the quick answer Dennis I will try to find another plugin - but I will use yours for the internal pages.
  • 15. Februar 2010
    I'm having a problem getting thumbnails to appear. Using thesis theme, which permits thumbnails. Not sure what problem may be: any suggestions? Also I would prefer to eliminate bullet points in front of lists. Easy way to do that?
    • 16. Februar 2010
      I took a look at your page and as i see it works. It is still solved? Where was the problem?
  • Mike
    25. Februar 2010
    Hi. I am using the short code bc my theme doesn't support associated_posts. It works pretty well but I have 2 minor problems. 1st my posts are indented meaning they dont line up on the left side but are about 2cm from the left border. On my post side the article starts perfectly at the left side and is not indented. Not sure if I can change this or if its bc. of the short code. 2nd. I dont get the Posted in XYZ | No Comments » section at the end of the article as I do on the post page. Again that might be intended or due to the short code. Thanks
    • 01. März 2010
      1st: Your Problem is the css of your theme. To solve that you should hire a css designer or kind of web developer. I.e. me ;) 2nd: Meta parts of the associated posts are currently not included in the plugin. This is a task of your theme. This will also require a developer. I.e.: me again.
  • 01. März 2010
    Hello Dennis! I'm looking for a way to associate posts to a page, and i guess your plugin seems to be doing that. The architecture is such : each project will be a page. Everytime a news relates to the project, i would create a Post and i would like to attach that post to the page, to display a "news" menu on my project page. Would that be possible with your plugin? thanks a lot, A.
    • 01. März 2010
      Hi Alexandre, what you described is exactly the function of the plugin. Do the following: Create a post category for each project. Go the project pages and select the created post category of the project as "associated post category". Add all posts which belongs to a project to the corresponding category. On the pages you can use the [associated_posts] ShortCode or you go to Settings and activate the auto append function. (See this in the readme) Thats it. If you like the plugin don't forget to give a good rating and a small donation. ;)
  • 01. März 2010
    What a fast reply! Thanks a lot! I'm investigating a request so i'm not sure yet if the project will happen. But if it does and i use your plugin, i surely will send some financial love to reward you. Suggestion: in the case there are many pages, there will be many categories. It is considered good practice to use categories sparingly, and tags for wild associations. Wouldn't it be better to use tags instead of categories? As an option, maybe?
    • 01. März 2010
      I've had the tag-idea too. Maybe i will add this in the next releases... ;)
  • Robert Gerrard
    03. März 2010
    Hi Just developing a new CMS site, and trying to use the plugin but can't get any posts to show. When I select "My Theme does not support associated posts. Append the posts to the end of the pages content" (and "show full text") and submit it, it deselects. Wordpress is v2.92 (just upgraded before adding the plugin and now note it isn't tested on this version yet! Just my luck) Anything I can do?
    • 04. März 2010
      I tested the plugin on 2.9.2 and it works fine. Don't know why it deselects after you submit it. Sorry, no idea.

Hinterlassen Sie eine Antwort