Fringer

Fringer
Рейтинг
82
Регистрация
19.09.2012

Liex так же как и seozavr практически мертвы.

техподдержка не отвечает.

забудьте об этих системах.

Polkan:
как-то так должно работать:
<?php echo preg_replace('|(.*\.).*|u','$1 ',mb_substr(strip_tags($post->post_content), 0, 200)); ?>

Спасибо большое! Работает!

Однако, я не подумал про знак восклицания (!) и вопроса(?). Иногда предложения заканчиваются ними, а не только точкой.

Можете подправить ваш код?

Насколько я понял, эта строчка возвращает текст до 200 символов. Остальную часть текста не показывает. Используется для небольшой аннотации к посту.

<?php echo mb_substr(strip_tags($post->post_content), 0, 200).' ';?>

Сейчас текст обрезается посередине предложения, что логично, учитывая лимит.

Как сделать так, чтобы текст мог все так же обрезаться в пределах 200 символов, но последним символом была точка, т.е. в аннотации отображались только целые предложения? Если предложение не влазит, то его не показывать.

Надеюсь понятно объяснил.

altezzik:
Функция повторяется. Или переименуйте или удаляйте.

Спасибо за ответ.

Извините, но в коде не шарю.

Где и что переименовывать?

Боюсь, что удалив что-то, тема не будет работать.

С моей проблемой кто-нибудь подскажет?

Перевести текст ошибки я могу и сам, но что не так в коде - не знаю.

Добрый день.
Никак не удается установить дочернюю тему.
При этом, когда захожу на сайт, вижу что тема частично встала(цвет поменялся и чуток верстки), но в админке постоянно ошибка.

Fatal error: Cannot redeclare _appthemes_load_features() (previously declared in /home/blabla/blabla/www/wp-content/themes/clipper/framework/load.php:21) in /home/blabla/blabla/www/wp-content/themes/clipper/framework/load.php on line 49


Вот что находится в файле load.php:

<?php


define( 'APP_FRAMEWORK_DIR', dirname(__FILE__) );

// scbFramework
require dirname( __FILE__ ) . '/scb/load.php';
scb_init();

require dirname( __FILE__ ) . '/kernel/functions.php';

appthemes_load_textdomain();

require dirname( __FILE__ ) . '/kernel/deprecated.php';
require dirname( __FILE__ ) . '/kernel/hooks.php';

require dirname( __FILE__ ) . '/kernel/view-types.php';
require dirname( __FILE__ ) . '/kernel/view-edit-profile.php';

function _appthemes_load_features() {

if ( current_theme_supports( 'app-wrapping' ) )
require dirname( __FILE__ ) . '/includes/wrapping.php';

if ( current_theme_supports( 'app-geo' ) )
require dirname( __FILE__ ) . '/includes/geo.php';

if ( current_theme_supports( 'app-login' ) ) {
require dirname( __FILE__ ) . '/includes/views-login.php';

list( $templates ) = get_theme_support( 'app-login' );

new APP_Login( $templates['login'] );
new APP_Registration( $templates['register'] );
new APP_Password_Recovery( $templates['recover'] );
new APP_Password_Reset( $templates['reset'] );
}

if ( current_theme_supports( 'app-feed' ) )
add_filter( 'request', 'appthemes_modify_feed_content' );

if ( is_admin() && current_theme_supports( 'app-versions' ) )
require dirname( __FILE__ ) . '/admin/versions.php';

if ( current_theme_supports( 'app-term-counts' ) )
require dirname( __FILE__ ) . '/includes/term-counts.php';

if ( current_theme_supports( 'app-plupload' ) )
require dirname( __FILE__ ) . '/app-plupload/app-plupload.php';
}

// Breadcrumbs plugin
if ( !is_admin() && !function_exists( 'breadcrumb_trail' ) ) {
require dirname( __FILE__ ) . '/kernel/breadcrumb-trail.php';
}

if ( is_admin() ) {
require dirname( __FILE__ ) . '/admin/functions.php';

require dirname( __FILE__ ) . '/admin/class-dashboard.php';
require dirname( __FILE__ ) . '/admin/class-tabs-page.php';

if ( version_compare( $GLOBALS['wp_version'], '3.5-alpha', '<' ) ) {
require dirname( __FILE__ ) . '/admin/taxonomy-columns.php';
}
}

add_filter( 'wp_title', 'appthemes_title_tag', 9 );

add_action( 'wp_head', 'appthemes_favicon' );
add_action( 'admin_head', 'appthemes_favicon' );

add_action( 'after_setup_theme', '_appthemes_load_features', 999 );

Подскажите, пожалуйста, в чем может быть проблема.
Спасибо.
SeVlad:
Перевести текст ошибки?

Перевести я и сам могу.

Не понятно почему возникает ошибка. В коде я не шарю.

Добрый день.

Никак не удается установить дочернюю тему.

При этом, когда захожу на сайт, вижу что тема частично встала(цвет поменялся и чуток верстки), но в админке постоянно ошибка.

Fatal error: Cannot redeclare _appthemes_load_features() (previously declared in /home/blabla/blabla/www/wp-content/themes/clipper/framework/load.php:21) in /home/blabla/blabla/www/wp-content/themes/clipper/framework/load.php on line 49

Вот что находится в файле load.php:

<?php

define( 'APP_FRAMEWORK_DIR', dirname(__FILE__) );

// scbFramework
require dirname( __FILE__ ) . '/scb/load.php';
scb_init();

require dirname( __FILE__ ) . '/kernel/functions.php';

appthemes_load_textdomain();

require dirname( __FILE__ ) . '/kernel/deprecated.php';
require dirname( __FILE__ ) . '/kernel/hooks.php';

require dirname( __FILE__ ) . '/kernel/view-types.php';
require dirname( __FILE__ ) . '/kernel/view-edit-profile.php';

function _appthemes_load_features() {

if ( current_theme_supports( 'app-wrapping' ) )
require dirname( __FILE__ ) . '/includes/wrapping.php';

if ( current_theme_supports( 'app-geo' ) )
require dirname( __FILE__ ) . '/includes/geo.php';

if ( current_theme_supports( 'app-login' ) ) {
require dirname( __FILE__ ) . '/includes/views-login.php';

list( $templates ) = get_theme_support( 'app-login' );

new APP_Login( $templates['login'] );
new APP_Registration( $templates['register'] );
new APP_Password_Recovery( $templates['recover'] );
new APP_Password_Reset( $templates['reset'] );
}

if ( current_theme_supports( 'app-feed' ) )
add_filter( 'request', 'appthemes_modify_feed_content' );

if ( is_admin() && current_theme_supports( 'app-versions' ) )
require dirname( __FILE__ ) . '/admin/versions.php';

if ( current_theme_supports( 'app-term-counts' ) )
require dirname( __FILE__ ) . '/includes/term-counts.php';

if ( current_theme_supports( 'app-plupload' ) )
require dirname( __FILE__ ) . '/app-plupload/app-plupload.php';
}

// Breadcrumbs plugin
if ( !is_admin() && !function_exists( 'breadcrumb_trail' ) ) {
require dirname( __FILE__ ) . '/kernel/breadcrumb-trail.php';
}

if ( is_admin() ) {
require dirname( __FILE__ ) . '/admin/functions.php';

require dirname( __FILE__ ) . '/admin/class-dashboard.php';
require dirname( __FILE__ ) . '/admin/class-tabs-page.php';

if ( version_compare( $GLOBALS['wp_version'], '3.5-alpha', '<' ) ) {
require dirname( __FILE__ ) . '/admin/taxonomy-columns.php';
}
}

add_filter( 'wp_title', 'appthemes_title_tag', 9 );

add_action( 'wp_head', 'appthemes_favicon' );
add_action( 'admin_head', 'appthemes_favicon' );

add_action( 'after_setup_theme', '_appthemes_load_features', 999 );

Подскажите, пожалуйста, в чем может быть проблема.

Спасибо.

первый и второй, урлы в лс пожалуйста.

диз 1 в 1 как на auto.ria.com

узконишевые сайты. Amazon?

Всего: 632