Answer the question
In order to leave comments, you need to log in
Linking articles to each other based on the analysis of link relevance?
Hello!
I came up with the idea to do something like relinking on my site, the idea is as follows:
1. Load an array of entities that have links, these are: posts, pages, categories.
2. We load an array of texts from all these entities.
We get, for example, the following array:
<?php
$entities = [
[
'title' => 'Купить слона просто',
'url' => '/post/kak-kupit-slona/'
],
[
'title' => 'Как выбрать мобильный телефон: 10 советов',
'url' => '/post/vibrat-telefon-sovety/',
'tags' => [
'телефон',
'выбрать',
'советы'
],
],
// ...
];
$texts = [
['text' => '... Очень много текста. Выбрать мобильный телефон не сложно, главное — ...'],
['text' => '... Тоже много текста. При этом текст объявления содержал заголовок: "Купить слона"... продолжение статьи'],
];
... Очень много текста. <a href="/post/vibrat-telefon-sovety/">Выбрать мобильный телефон</a> не сложно, главное — ...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question