Used this one for quite some years with enthusiasm. Now, however, it blocks the use of Media in the tiny editor.
]]>I have related links listed on the left had side of my website which include links to the page you are currently on. I am trying to add a class to the link of the page you are currently on so that I can change the styling.
Does anybody know how to do this?
]]>This is a really useful plug in and has given me pretty much what I needed.
I have one problem:
I have been experimenting with the Related Links plug in with the Fanwood theme. The links are appearing as expected on the post, but strangely the same list of related links also appear in the Category page in which the post was listed first.
It only happens with the first post (and any additions to the related links in that post also appear on the Category page). Any new posts in the same category do not show the same problem (i.e. the related links are only on the post page and not on the Category page).
Any ideas if/how this can be fixed?
Thanks
]]>Hye!
I just downloaded and install the plugin. Added links to realted pages but how Can i show this . There is no showr code. Help needed. Found that PHP string in description but where to put it and how.?
Regards
]]>Hi, I like your plugin, pretty work. But is here a way for ordering searched posts? Or just posts what are listening first. I mean…
Plugin should show me posts ordered like automatically featured posts or something like this. Is it possible?
Hi, I have a client who has been using your plugin heavily for a while, and we have recently added an online store to the site using the shopp plugin. This plugin creates a new custom post type called ‘product’ and we are hoping to use related posts on the product pages in the same way that we are using it for other post types throughout the site. I have enabled the new ‘product’ custom post type in the related links settings, but the metabox is not showing up on the product edit page. The metabox is still working fine for all other post types, so I’m sure it’s something specific to this one post type. I have set the site to WP_DEBUG mode, but there are no errors being reported on the edit page. Is there any easy way to figure out why this is happening. Happy to roll up my sleeves and look around myself, but I’m hoping someone could suggest where to begin looking. Thanks for any assistance!
]]>Some uses may want to optionally set a target on custom links. Any chance this feature could be added?
I’ve made a modification to this plugin on the website I’m using it in to allow a target to be set on custom urls, though I’ve just made it a text field with a placeholder of “_blank” as a hint. But I could you could change this to a checkbox if it’s only going to be same window or _blank.
Also, rather than set target attribute, the checkbox could set a class of “external” on the link through which to hook some jQuery that actually opens in a new window, for accessibility purposes.
If you think something like this is a good idea, but don’t have the time to implement it, I don’t mind forking and issuing a pull request if you want to include any change I made back into the official plugin.
]]>Hello @chabis, great plugin, it works exactly as I wanted!
The only problem I’m having is with the meta box been shown on unwanted post types, even thou I have unticked the box on the settings page.
the problem is that it’s not been checked if the current post type is on the list:
Version 1.7.1
WP 3.5.1
class-related-links-box.php lines 95 – 100 (original)
public function add_box()
{
global $post_type;
add_meta_box( 'related-links-box', __( 'Related Links', 'related-links' ), array( $this, 'create_box_content' ), $post_type, 'side', 'low');
}
My implemented fix:
class-related-links-box.php lines 95 – 103 (modified)
public function add_box()
{
global $post_type;
if (!in_array($post_type, $this->settings['types']))
return;
add_meta_box( 'related-links-box', __( 'Related Links', 'related-links' ), array( $this, 'create_box_content' ), $post_type, 'side', 'low');
}
Please ignore if this has been fixed or if it’s been checked somewhere else.
]]>How would I go about checking to see if the count of “Pages” && “Custom” links is greater than zero?
I’m using the plugin with 3 custom post types that will be populated on every page in a separate toolbar, so a general count check of the main array won’t work … as shown in the following code:
$related_pages = get_related_links();
if(count($related_pages) != 0){
<div id="relatedlinks">
<h3>Related Links</h3>
Do loop
</div>
}
Can’t seem to figure out how to check for both of the types in the array…
Any help would be appreciated.
Thanks.
Is it possible to extend the plugin to acquire a value from a meta box for a custom post type?
I’d like to use a URL from the meta box instead of the permalink.
Meta box ID:
ecpt_wp-pdf-document
Thanks.
]]>How would I go about modifying the below code to include the custom links the user can add via the interface?
<?php $related_links = get_related_links('page'); ?>
<ul>
<?php foreach ($related_links as $link): ?>
<li><a href="<?php echo $link['url']; ?>"><?php echo $link['type']; ?>: <?php echo $link['title']; ?></a></li>
<?php endforeach; ?>
</ul>
]]>
Is there any way to expand this plugin to allow for multiple instances of this plugin within a page?
For example, one instance would display related pages (only). While other instances would display related custom post types such as “Whitepapers”, “Case Studies”, etc
This way I would have more control of their front-end display instead of lumping them into one related information area.
]]>Hello!
First of all congratulations for the plugin, is really useful!
When I used it I had some incompatbilities with the qtranslate plugin for instance the title of the post appears three times in the blog, and also in the backend.
I thought it was for the ‘post_content’, so I changed some lines from related-links.php:
// Check if the post exists
$found_post = get_post( $id );
$language = apply_filters('the_title',$found_post->post_title);
if( !empty( $found_post ) && $found_post->post_status != 'trash' && $found_post->post_status != 'draft' )
{
// Push posts values
if( $post_type == get_post_type($id) || empty( $post_type ) )
{
$values[] = array('id' => $id, 'title' => $language, 'url' => get_permalink($id), 'type' => $found_post->post_type);
}
And I’ve solved it in the frontend. Hope it will be useful for someone.
bye!
P.D.: If anyone know how to solve in the backend it will be perfect ??
]]>hi
i need to this plug in appearing at footer of post
and dosent show on home page !
this like this plug in :
https://www.nutt.net/tag/link-footnotes/
i need it !
please make it as soon as possible ??
Hi first of all thanks for a great plugin! Can you please make use of the plugins_url function instead of using WP_PLUGIN_URL in order to be able to use https?
]]>Hi,
Nice plugin, just started playing around with it and considering adding built in support in my theme https://www.stallion-theme.com/
You should advise using code like this for adding to themes so it’s only run when the theme is installed and active, otherwise PHP error since the function doesn’t exist.
<?php
if(function_exists('get_related_links')){
related_links();
}
?>
Also means other users who add it to a theme can disable the plugin temporarily or forever without having to re-edit the theme files.
David
]]>Dear Worpdress developpers,
I think this awesome plugin “Related Links” is broken with WordPress 3.4.
You should replace in
related-links/include/class-related-links-box.php
(at the beginning)
wp_enqueue_script('related-links-scripts', WP_PLUGIN_URL . '/related-links/js/script.js', array('jquery'), '1.0');
by
wp_enqueue_script('related-links-scripts', WP_PLUGIN_URL . '/related-links/js/script.js', array('jquery', 'jquery-ui-core', 'jquery-ui-sortable'), '1.0');
We needed to be able to re-use custom links (i.e. linking to “Google” on many of our posts/pages) and didn’t want to have to continually re-enter that link as a custom URL.
I’ve altered the plugin locally to do the following:
Add “Custom” to the list of options in the settings page.
Query the database for all “custom_” meta definitions in the wp_postmeta table and present them as options to the user in the list
When you click on a previously defined custom link, it adds it to the page just like a normal post or page link.
Because I’m strapped for time, I’ve done this kind of brute-force. I can send you the code for you to clean up and review. This is a cool addition to the plugin as it saves lots of time if you have repetitive custom links to add to your pages.
Reply back with how I should send you my changes.
Thanks
John Cokos
]]>Perhaps a stupid question. I’ve been searching all over the place, but cannot find there to use this code in your template:
<?php related_links(); ?>
In which PHP file or template file to I add it where?
I’m using Atahualpa 3.7.7 as theme.
I want the related links to show up right below the text on a single post page, just before other the other plugins (like Tweet This).
]]>Hey, great plugin. I really like it a lot, it solved a couple of big issues I was having with a few sites.
However, this could be so much more awesome if it had a few more features. I don’t have time to do them myself right now, but if you’re working on a new release, here’s a couple ideas:
1. After creating a custom link, append it to the list of pages and posts so that you can use it again without having to retype everything.
2. Add Media as a third type of related item– I work on sites that have a lot of PDFs that they want to make available to their users– I know I can use a custom link to link to them, but if media has its own type, I can style it differently (like by giving PDF docs a little PDF icon next to them, that sort of thing)
3. Rework the User Interface:
Right now I’m working on a site that has a TON of pages and posts. Putting them all in one list is kinda cluttering it up. It would nicer if there were tabs for each type that you could switch between.
Thanks again for a great plugin! Looking forward to updates in the future.
Thanks,
jhned
]]>Hello,
I love this plugin, but I would like the links appearing only on the pages and excluding it from the frontpage. How can I do that?
Thanks,
E.
Hello
Great plugin, it works exactly as I wanted !
There’s only one feature I’m missing : if I link a post to an other post, I’d like the other post to show a link to the first post as well. Could you add an option to do that ? Or help me editing the plugin maybe ?
Thanks
Nicolas
When using the related links plugin I noticed that with WP_DEBUG on, I kept getting an error warning me that line 236 of “class-related-links-box.php” was attempting to access an attribute of a non-object. The fix is simple: you have to send the Post ID with the ajax call, because the ajax call won’t automagically know what the ID is.
My patch:
class-related-links-box.php, line 236:
$meta = get_post_meta(intval($_POST['post_id']), '_related_links', true);
script.js, line 118-121:
var data = {
action: "load_links_list",
post_id: jQuery('#post_ID').val()
};
]]>
I have some links that are of type ‘custom’ (i.e. links to other, external websites). I want to give these a different icon, so I’m trying to list them separately from post and page links. In order to list them separately, I am using:
<?php $related_links = get_related_links("custom"); ?>
<?php foreach ($related_links as $link): ?>
<li><a class="external" href="<?php echo $link["url"]; ?>"><?php echo $link["title"]; ?></a></li>
<?php endforeach; ?>
That is fine – it shows just the custom (external) links. However, when I try to get links of type ‘post’, it is bringing in the custom ones too:
<?php $related_links = get_related_links("post"); ?>
<?php foreach ($related_links as $link): ?>
<li><a class="internal" href="<?php echo $link["url"]; ?>"><?php echo $link["title"]; ?></a></li>
<?php endforeach; ?>
]]>
I have installed this plugin and it correctly shows me the link and title of the related posst that I manually add to a single post. However, I’m trying to also show the terms of the custom taxonomy the post belongs to. Can anyone please help me how to do this?
]]>Is there an option to display a thumbnail for each related post along with the post title?
]]>Can’t see the plugin name within widgets.
]]>Hi.
I installed and activated this plugin and set up related links on one of my pages. However, the related links aren’t appearing in the page that I called the related links function is.
I also don’t see an option to add a related links widget.
Thanks
]]>The “type” is funky because I had a page with a similar name. How can I show the Label or the Name of a custom post type?
I”ve tried
<?php echo $link["label"]; ?>
<?php echo $link["name"]; ?>
no luck.
]]>Plug in is great! I’m trying to set it up so that if there aren’t any related posts some default text is shown.
my goal is:
– if there are related posts:
– show this title and all the related posts (this part is working great)
– if there aren’t any related posts:
– show a different title and some set links