Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
VisualNEO Web 2018.12.15
SentiMask SDK Trial 1.0.0
OrgChart JS 4.6.4
dotConnect for BigCommerce 1.8
FedEx Smart Shipping For Magento 1.0.0
Database Workbench Pro 5.6.2.311
Taxi App Development 7.3
RentALL-Airbnb clone script 1.8.0
PHP Ecommerce Script 1.3.2
dbForge Studio for PostgreSQL 2.1
Rentonn - Airbnb clone 1.0
VisualNEO for Windows 18.08.31.0
SentiVeillance SDK Trial 7.0.191272
dbForge SQL Complete 6.1
Uber for E-Scooters 1.0
Top Code
MATLAB Support Package for Arduino (aka ArduinoIO Package) 1.0
Hyperion Tools 1.0
bit plane slicing 1.0
Efficient K-Means Clustering using JIT 1.0
Azizi search engine script PHP 4.1.10
e-Classifieds: Commerce Edition 3.41
Cuckoo Search (CS) Algorithm 1.0
dbForge Search for SQL Server 2.3
RoundCube Webmail for Email Systems Utilities 0.1.1
Delphi Crt 120
Cuckoo Optimization Algorithm 1.0
PHP GZ Blog Script 1.1
Dragable elements Script for Graphics and Animations 1.1
iGesture - Gesture Recognition Framework 1.0
Shadelayer Highlighter 1
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
Better Related Posts 0.4.3.3
File ID: 101984






Better Related Posts 0.4.3.3
Download Better Related Posts 0.4.3.3http://wordpress.orgReport Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 3
Submit Rating:
Better Related Posts 0.4.3.3 Description
Description: Custom post types are one the best features in WordPress. Since WordPress 3.0 they are much easier to use. Almost every theme I build for a client features at least one custom post type and usually a custom taxonomy as well.

But there is a problem. There is no plugin that lists related posts that are from a custom post type. After looking through the sourcecode of a few plugins I decided to implement my own related content plugin.
Plugin Features

* Depends on PHP5 and MySQL5
* Option to add related posts to the RSS feed
* Use fulltext indexes for good performance
* Does caching through post meta or transients
* Incremental scoring for sites with many posts
* Find related posts, pages and custom post types
* Score relationships by various MySQL relevance scores or term relationships
o Use tags, categories or custom taxonomies
* Internationalized, OO, hopefully well documented and readable

Other plugins I wrote

* Better Lorem Ipsum Generator
* Better Related Posts
* Custom Avatars For Comments
* Better Tag Cloud
* Theme Switch
* MU fast backend switch
* Visitor Movies for WordPress
* Zero Conf Mail
* Move WordPress Comments
* Delete Pending Comments
* Snow and more

Install :

If you have a big site keep in mind that installing this plugin will create a fulltext index for your posts, so the size of the wp_posts table can almost double.

1. Upload the plugin to your plugins directory
2. Enable the plugin
3. Enable automatic display of related posts

How to place a related content list manually

If you don't enable automatic display of related posts on the plugin options page (the very first setting) you'll have to use the template tag to insert a related content list into your theme. If you use this outside of the WordPress loop you have to pass the post ID as parameter.
How to build a custom loop of related posts

Here is a short example how to build your own loop of related posts. This way you can add excerpts, post thumbnails etc.


Please notice that the posts won't be ordered by score if you build a loop like this. To accomplish this you'll have to sort the posts in $my_query manually. I have a relevant example on how to sort posts manually on my site. I'll build something like this into the plugin in the future.
How to evaluate different scoring methods

Logged in admins can get the results of all scoring methods by using the template tag in the loop of their theme. Example:


The scoring methods

Content to content, title to content and title do title are simple MySQL fulltext searches.

Keywords to content and keywords to title do a fulltext search for a string that contains all terms a post has. If a post is in the category Fruits and tagged sweet a fulltext search for "Fruits sweet" will be performed.

Terms against taxonomies searches for posts that have the same terms as the current one. By default only posts that use the same taxonomy are found. It is however as well possible to find posts that use a different taxonomy, by searching this other taxonomy for terms of the same name. See the examples below.
How to use different configurations at the same time

It is possible to use different configurations of the plugin at the same time. Let's say you use the normal related content feature for your posts. But you also have a custom post type 'venue'. To get a custom list of related venues use this:


It is imporant to define a storage ID, or the plugin will overwrite the scores for the standard posts with the scores for your custom configuration. The default storage ID is 'better-related-', so you should avoid that unless you changed the default.

To get a similar listing that includes related posts (from the built-in 'post' post type) use:


Now an example that shows off all configuration options available:


Notes:

* Using the usetax parameter means that cross-taxonomy searches will be performed. It is not recommended to use this parameter at the moment, as it's usage will probably change in the future. However, if different taxonomies share terms you can play with this parameter.
* You should not log on live sites.
* The high querylimit in this example could slow down your site.
* The transient storage should only be used temporarily and for testing purposes.
* Enabling incremental scoring means that the relatedness scores for posts will be calculated in multiple steps. In the example above up to 30000 related posts will be found and the necessary queries will be spread across three page views, assuming there is no cache.

Find posts related to a string

The template tag returns related posts for a string. The tag prints a list of posts related to a string. Usage:


I use this on 404 pages currently, see the paste for my dynamic WordPress 404 search form. In the future I will probably add a replacement for the built-in WordPress search to this plugin.
mysqld configuration

Generally speaking, the plugin should work out of the box. However, there are two settings you might want to change, see the mysql full-text fine-tuning docs.

ft_min_word_len controls the minumum length of words. This defaults to 4, which might be too small if you use acronyms like CSS, PHP etc. You can change or set that option to 3 in your mysqld config. You will have to re-build your fulltext indexes after doing this, use "REPAIR TABLE table_name QUICK;" where table_name is wp_posts on a default WordPress install.

The second option could be interesting if your site is not in english and you want to improve search results. Use the ft_stopword_file option to create your own stopwords file. MySQL uses english stopwords by default.

License: Freeware

Related: Custom, related, Wordpress, posts, Comments, types, Plugins, Relationships, Features, documented, score, Pages, Sites, readableother, taxonomies, relevance

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 3



More Similar Code

There is a problem with related posts plugins, and Efficient Related Posts is fixing that by approaching the problem from a different direction and offering a very different solution.

Basically, current related post plugins build the list of related posts on the fly when the user needs to view it. Since blogs tend to be viewed far more often than they are updated (often hundreds of times more often), these queries are run way more...



Related Posts by Category lists similar posts within any post. As a search string the plugin does not use the title of the article nor weighs the content. In fact the category, which was assigned to the post, serves as the source of accordance.



WordPress Related Posts Plugin will generate a related posts via WordPress tags, and add the related posts to feed.

Installation:

1. Upload the folder WPRP to the /wp-content/plugins/ directory
2. Activate the plugin...



This plugin makes it super easy to manually select related posts. You can search and select posts that fit your criteria, all from within the write/edit post screen.

Creating a system of related posts/pages on your site will result in...



Related posts slider creates a very attractive slider of the related posts or/and pages for a WordPress post or page.

The slider is a lightweight jQuery implementation of the related post functionality. It has a ready shortcode and...



Choose your related posts! Most related posts plugins and widgets generate a list of related posts by fetching some posts from the database that have the same or similar tags or categories. Some use both. These related posts can be very...



The All Related Posts plugin is a simple behavioral targetting plugin. It provides a widget which will display a specified number of relevant posts based on the user's behavior. It however does not create a user profile or impacts user privacy.



* The IGIT Related Posts With Thumb After Posts Plugin Automatically inserts one widget after posts having related posts.
* Related Posts showing by title and content matching, If it not show related posts by title content matching it will...



This plugin will add related posts thumbnails after the post. Plugin allows to customize thumbnail sizes, display settings and type of relation.

By default it uses generated by Wordpress thumbnail for the first image appeared in the...



This plugin allows you to list any number of related posts from the same category as the current post. You can also randomise these results. It is very lightweight, at only 3KB.

There are a number of options available:

*...

User Review for Better Related Posts
- required fields
     

Please enter text on the image