SEO PRO  For Osclass SEO

SEO PRO For Osclass SEO 3.9.0 (2/26 2021)

No permission to download
Lv.2
badge id 1 1 Year of Membership badge id 2 2 Years of Membership
Joined
Sep 7, 2022
Messages
6
Reaction score
2
Credits
$0
thanks to dear member @Rustamsubmitted a new resource:SEO PRO плагин-SEO PRO plugin
OscClass SEO PRO pluginThis plugin contains everything needed for SEO optimization of the Osclass classifieds board.

With it, you can save/add title, description, and keywords for the most important pages on your site.

Osclass SEO PRO plugin has an embedded robots editor and a solar map generator.

The map generator has various customizable parameters, and in tests shows the best results in memory consumption and time to generate maps...
Read more about this resource...
 
Canonical для поиска
oc-content >themes >bender >functions.php

Вставить в самый низ перед закрывающим тегом php

Code:
// Добавляем canonical для страниц поиска
// Конфигурация - что включать в canonical
$GLOBALS['canonical_config'] = array(
    'include' => array(
        'sPattern'  => true,   // включить поисковый запрос
        'sCategory' => false,   // включить категорию
        'sCountry'  => false,  // включать страну
        'sRegion'   => false,   // включить регион
        'sCity'     => false,   // включить город
        'sUser'     => false,  // включать пользователя
    ),
    'exclude_always' => array(
        'iPage', 'sOrder', 'iOrderType', 'bPicOnly', 'sShowAs'
    )
);
function my_configurable_canonical() {
    global $canonical_config;
    if (!osc_is_search_page()) return;
    $params = Params::getParamsAsArray();
    $clean_params = array('page' => 'search');
    // Добавляем разрешенные параметры
    foreach ($canonical_config['include'] as $param => $include) {
        if ($include && isset($params[$param]) && !empty($params[$param])) {
$clean_params[$param] = $params[$param];}}
    // Формируем URL
    $canonical_url = osc_base_url() . 'index.php?' . http_build_query($clean_params);
    echo '<link rel="canonical" href="' . $canonical_url . '" />' . PHP_EOL;
}
osc_add_hook('header', 'my_configurable_canonical', 5);

Включен чпу урл заменить правила s и p
правила и префиксы в коде должны совпадать
 
Top