webjey

Рейтинг
46
Регистрация
09.04.2013

1.

How can I manually edit title and meta description tags?

Make sure you have either the WordPress Seo by Yoast plugin or the All in One SEO Pack plugin installed and activated.

From the WP admin dashboard, go to Directory -> Listings

Click the Fields tab.

From the Available Fields panel on the right (or left for RTL languages), click Single Line Text.

Enter “meta_title” for Field name.

Enter “Meta Title” for Label.

Under Visibility Settings, unselect all checkboxes but the Administrator checkbox.

Press the Add Field button to save the field.

From the Available Fields panel on the right (or left for RTL languages), click Paragraph Text.

Enter “meta_description” for Field name.

Enter “Meta Description” for Label.

Under Visibility Settings, unselect all checkboxes but the Administrator checkbox.

Press the Add Field button to save the field.

Now, try editing one of your listings as administrator and you should see two new fields you just created. Enter values for these fields and they will replace the original values that were automatically generated by the plugin.

2.

How can I add custom fields?

From the admin dashboard, go to Directory -> Listings and click on the Fields tab. There you will see a form editor with default fields on the main section and a small panel containing buttons to create new fields on the right. Simply click on the button of the field type you would like to create and fill out the form that will be displayed in a modal window. Submit the form in the window and you’ll see the field added to the bottom of the form editor section.

Подробнее тут http://codecanyon.net/item/sabai-directory-plugin-for-wordpress/4505485/support

Сам модуль подключен,потому как


root@vultr:~# a2enmod rewrite
Module rewrite already enabled


В /etc/apache2/mods-enabled/rewrite.load ссылка есть.

Не работает скорее всего потому, что не читается .htaccess.

Чтобы он читался измените директиву AllowOverride None на

AllowOverride All в файле /etc/apache2/apache2.conf

Должно получиться что-то вроде этого:


<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Ну и в самом файле .htaccess


RewriteEngine On
.....

После чего перезагрузить сервер.

Это для непосредственного обращения к таблице.Например у нас есть другая таблица (table6),с тем же наименованием полей ord_zena,kro_zena ...

Тогда можно выполнить такой запрос

SELECT table5.id,table5.ord_zena,table5.kro_zena,table5.pro_zena,

table6.pro_zena as t6zena FROM table6 ,table5
WHERE table5.pro_zena >0

В данном случае можно обойтись без этого.

Чтобы увидеть все колонки с "zena" можно выполнить запрос:

SHOW COLUMNS FROM table5 LIKE "%zena%"

Набросал php прототип чтобы не перечислять,но тут 2 запроса:


<?php
$host="localhost";
$db="";
$charset="utf8";
$user="";
$pass="";

$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$opt = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
);
try {
$pdo = new PDO($dsn, $user, $pass, $opt);
} catch (PDOException $e) {
die('Подключение не удалось: ' . $e->getMessage());
}

$data = $pdo->query('SHOW COLUMNS FROM table5 LIKE "%zena%"')->fetchAll(PDO::FETCH_COLUMN);
$zena='SELECT id, ord_zena, kro_zena, pro_zena FROM table5 WHERE ';
foreach ($data as $param){
$or='OR ';
if ($param === end($data)){
$or='';
}
$zena.=sprintf("%s > 0 %s",$param ,$or);
}
$stmt = $pdo->query($zena)->fetchAll();
echo $zena.PHP_EOL;
print_r($stmt);

Возможно есть более изящное решение.


SELECT table5.id,table5.ord_zena,table5.kro_zena,table5.pro_zena FROM table5
WHERE ord_zena>0 OR kro_zena>0 OR pro_zena>0

У блога должен быть RSS/ATOM feed.Можно его распарсить на станической странице.В этом Вам поможет этот jQuery плагин - https://github.com/jfhovinne/jFeed

Итак,как искать:

Открываем http://kino-brat.ru/online/boeviki/russkie-boeviki-2016-goda-smotret-onlayn/419-posledniy-ment-serial-2015.html

Сhrome:

F12

CTRL+SHIFT+F

Firefox:

F12

CTRL+ALT+F

вводим в поисковую строку "q99.it"

видим что строка встречется в файле http://static.hypercomments.com/widget/hcembed/22278/en/242/1/widget.js

Посему я предположил,что проблема в hypercomments.Как его отключить- Вам виднее. Посмотрите какие установленны модули и в файлах шаблона.

Попробуйте отключить hypercomments.


function show_tags() {
return get_the_tag_list('<p>Метки: ',', ','</p>');
}

add_shortcode( 'tags', 'show_tags' );
Gerga:
webjey, вы массив превращаете в строку, а затем строку снова в массив :)

Я -нет. Я исправил ошибку тс в его исходном коде.


var str2 = String(coords);
str2.split(',');
alert(str2[0]);

Ваше решение безусловно лучше.

http://javascript.ru/String/split


var str2 = String(coords);
var arr = str2.split(',');
alert(arr[0]);
Всего: 193