stundr

stundr
Рейтинг
201
Регистрация
19.06.2008
48361

повторю вопрос:

через плагин ucan post почему то не добавляются картинки и галереи. поюзал гугл, многие с подобной проблемой сталкиваются, но кроме решения обновить плагин ничего не нашел. Скачал последний плагин (да и предыдущие версии пробовал) проблема не решается. пробовал и на локальной машине и на хостинге... Кто нибудь подскажите, как можно разрешить пользователям загружать галереи на сайт в определенную категорию, что бы не заходить в админку (юзеры не настолько продвинутые)..

помогите справится с этой задачей. на дефотовом шаблоне с отключенными плагинами тоже не работает...

dkv023:
Ведь в интернете к примеру домен ру считается лучшим для индексации и дружбы с яшей

то, что большинство сайтов через яшу ищется в зоне ru не означает что они лучше индексируются чем какие либо другие

с предыдущим вопросом видимо никому не охото возиться, ну ладно, буду пробовать дальше что то сделать..

новый вопрос. через плагин ucan post почему то не добавляются картинки и галереи. поюзал гугл, многие с подобной проблемой сталкиваются, но кроме решения обновить плагин ничего не нашел. Скачал последний плагин (да и предыдущие версии пробовал) проблема не решается. пробовал и на локальной машине и на хостинге... Кто нибудь подскажите, как можно разрешитьпользователям загружать галереи на сайт в определенную категорию, что бы не заходить в админку (юзеры не настолько продвинутые)..

Подскажите по шаблону comfy, в категориях не отображается сайдбар и подвал, что делать? на главной все нормально, если зайти на саму запись, то тоже все отображается, а вот в категории нету...

для сайта визитки подойдет и вордпресс

укажите на какой нибудь странице, что вы оказываете услуги/что то продаете по Москве, и отправьте службе поддержке, пусть еще раз подумают.

У нас подобного плана была проблема, присваивался регион Москва (офис только в Москве), а торгуем по России. Отправили на проверку страницу на которой написано, что доставка осуществляется по всей России, после чего нам присвоили нужный нам регион.

power-web:
ТС, а Вы сами пытались проверить, отдает ли Ваш сайт 200 ответ?

честно говоря мало в этом понимаю, но проверил:

HTTP/1.1 200 OK

я так понимаю это хороший результат?

разместился, скорость размещения порадовала.

площадка отличная

если поправите, то это будет только приветствоваться.

можно без плагина.

вставьте в файл functions.php код:


function ordered_thumbnails( $display = 'true', $class='' ) {

global $post;

// get all image attachments for this post
$images = get_children( array( 'post_type' => 'attachment', 'post_parent' => $post->ID, 'post_mime_type' => 'image', order=>"asc" ) );

// if the post has image attachments
if( $images !== false ) {

// find the image in position 1
foreach($images as $i) {
if ( $i->menu_order == 1 ) {
$img_id = $i->ID;
}
}

// if the images were unordered
if ( $img_id == '' ) {
$i = array_slice( $images, 0, 1 );
$img_id = $i[0]->ID;
}

// get image data
$image = wp_get_attachment_image_src( $img_id, 'thumbnail' );

$result = array(
'url' => $image[0],
'width' => $image[1],
'height' => $image[2]
);

// should the image be displayed or should data be returned as an array?
if ( $display == 'true' ) {
return _e( '<img src="'.$result['url'].'" width="'.$result['width'].'" height="'.$result['height'].'" class="'.$class.'" />' );
} else {
return $result;
}

} else {

// post does not have any image attachments
return (bool) false;

}
}

function ordered_thumbnails_medium( $display = 'true', $class='' ) {

global $post;

// get all image attachments for this post
$images = get_children( array( 'post_type' => 'attachment', 'post_parent' => $post->ID, 'post_mime_type' => 'image', order=>"asc" ) );

// if the post has image attachments
if( $images !== false ) {

// find the image in position 1
foreach($images as $i) {
if ( $i->menu_order == 1 ) {
$img_id = $i->ID;
}
}

// if the images were unordered
if ( $img_id == '' ) {
$i = array_slice( $images, 0, 1 );
$img_id = $i[0]->ID;
}

// get image data
$image = wp_get_attachment_image_src( $img_id, 'medium' );

$result = array(
'url' => $image[0],
'width' => $image[1],
'height' => $image[2]
);

// should the image be displayed or should data be returned as an array?
if ( $display == 'true' ) {
return _e( '<img src="'.$result['url'].'" width="'.$result['width'].'" height="'.$result['height'].'" class="'.$class.'" />' );
} else {
return $result;
}

} else {

// post does not have any image attachments
return (bool) false;

}
}

// create template tag "ordered_thumbnails"
add_action( 'ordered_thumbnails', 'ordered_thumbnails', 2 );


// Add Post Thumbnail Theme Support
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
add_image_size( 'featured', 200, 150, true );
}

//get thumbnail
function postimage($size=medium) {
if ( $images = get_children(array(
'post_parent' => get_the_ID(),
'post_type' => 'attachment',
'numberposts' => 1,
'order' => 'ASC',
'post_mime_type' => 'image',)))
{
foreach( $images as $image ) {
$attachmentimage=wp_get_attachment_image( $image->ID, $size );
echo $attachmentimage.apply_filters('the_title', $parent->post_title);
}
}
}

//check any attachment
function checkimage($size=medium) {
if ( $images = get_children(array(
'post_parent' => get_the_ID(),
'post_type' => 'attachment',
'numberposts' => 1,
'post_mime_type' => 'image',)))
{
foreach( $images as $image ) {
$attachmentimage=wp_get_attachment_image( $image->ID, $size );
return $attachmentimage;
}
}
}

и в файл single.php в нужное место код:


<div>
<?php
$tags = wp_get_post_tags($post->ID);
if($tags):
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'showposts'=> 5, // Number of related posts that will be shown.
'caller_get_posts'=> 1
);
$rp_query = new wp_query($args);
endif;
if($rp_query):
if($rp_query->have_posts()) ?>
<?php while ($rp_query->have_posts()): $rp_query->the_post(); ?>

<div style="width:210px;padding:10px;text-align:center;display:inline-block;position:relative;vertical-align:top;float:left;" >
<div style="text-align:center;"><a href="<?php the_permalink() ?>" title="<?php the_title('', ''); ?>"><?php ordered_thumbnails(); ?></div>
<div style="text-align:center;"><?php the_title(); ?></a></div>
</div>
</div>

<?php endwhile; ?>
<?php else: ?>
<div><?php _e("Матрица свободна, Нео...",""); ?></div>
<?php endif; wp_reset_query(); ?>
</div>
Всего: 1725