afrila gunadi
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: how to filtering data in select option from custom post typeyes, i don’t want to include this room..
Forum: Fixing WordPress
In reply to: How to add google font into theme options typographyI think it would require a lot of folders, is there another way? thx ??
because the theme I was going through tests on Themeforest.
Forum: Fixing WordPress
In reply to: How to add google font into theme options typographythanks for the reply,
you mean style.css in the theme options right?
not style.css in theme wordpressForum: Themes and Templates
In reply to: how to use shortcode in sidebar textoh yeeaahh. you’re my hero. it’s worked.
my guess is correct, but i don’t know what’s wrong with shortcodes [accordion]..
thank you very much ??
*regards*Forum: Themes and Templates
In reply to: how to use shortcode in sidebar textin my opinion, there seems to be something wrong with the function shortcode [accordion]
this my code
function sunshine_accordion ( $atts, $content ) { return '<div class="accordion" id="accordion2">'.$content.'</div>'; } add_shortcode( 'accordion', 'sunshine_accordion' );
$content will be in the input shortcode [accordion_toggle] .. [/accordion_toggle]
what do you think?
Forum: Themes and Templates
In reply to: how to use shortcode in sidebar textstill doesn’t work.
in this case, the result be usual text..
Forum: Themes and Templates
In reply to: how to use shortcode in sidebar texti’m not use plugin for schortcode,
i make my own shortcode..
Forum: Themes and Templates
In reply to: how to use shortcode in sidebar textthx for your comment ??
I’ve added it and it works.
work if I only enter a shortcode
[accordion_toogle] … [/accordion_toogle]
[accordion_toogle] … [/accordion_toogle]if i input with
[accordion][accordion_toogle] … [/accordion_toogle]
[accordion_toogle] … [/accordion_toogle][/accordion]
it doesn’t work ??
Forum: Fixing WordPress
In reply to: how to create metabox upload imageoke, i’ll check it.
jeff : yes, I think this has been resolved ??
now, i have a solution.
this my code :
<div class="callbacks_container"> <ul class="rslides pic_slider"> <?php if (has_post_thumbnail()) { $image_id = get_post_thumbnail_id ($room->ID ); $image_thumb_url = wp_get_attachment_image_src( $image_id,'feature-image'); $attr = array( 'class' => "room-sample", ); echo '<li>'; the_post_thumbnail ('feature-image', $attr ); echo '</li>'; } if (class_exists('MultiPostThumbnails')) { $i=1; while ($i<=3) { $image_name = 'image-'.$i; // my name id thumbnail = image-2, image-3. if (MultiPostThumbnails::has_post_thumbnail('room', $image_name )) { $image_id = MultiPostThumbnails::get_post_thumbnail_id( 'room', $image_name, $post->ID ); $image_thumb_url = wp_get_attachment_image_src( $image_id,'feature-image'); $image_feature_url = wp_get_attachment_image_src( $image_id,'feature-image' ); $attr = array( 'class' => "room-sample", ); $image = wp_get_attachment_image( $image_id, 'feature-image', false, $attr ); echo '<li>'; echo $image; echo '</li>'; } $i++; } }; ?> </ul> </div>
in my case, $room it’s mean post_type “room”.
“if” the first to display a thumbnail without plugins. and “if” the second, showing two thumbnails that I created with the plugin. so, all three thumbnails.good luck ??
Forum: Plugins
In reply to: [Multiple Post Thumbnails] Display multiple post into shortcodefunction sunshine_slide ( $atts, $content ) { extract ( shortcode_atts( array ( 'link' => get_site_url(), 'open' => 0, ), $atts )); $args = array ( 'post_type' => 'room', 'posts_per_page' => 1, ); $room = get_posts($args); $retval = '<div class="row">'; for($i=0;$i<sizeof($room);$i++) { $retval .= '<div class="span8"><div class="callbacks_container"><ul class="rslides pic_slider">'; $thumb = get_the_post_thumbnail($room[$i]->ID,'full'); /* if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type($room[$i]), 'image-2'); endif; */ $retval .= '<li>'.$thumb.'</li>'; $retval .= '</ul></div></div>'; $retval .= '<div class="span4"><div class="room-description">'.$room[$i]->post_content.'</div>'; $retval .= '<div class="row list-features"><h4 class="span4">Features</h4><ul class="room-features">'; $categories = get_the_terms( $room[$i]->ID, 'room_categories' ); foreach ( $categories as $term) { $cat = $term->name; $retval .= '<li class="span2"><i class="icon-check-sign"></i>'.$cat.'</li>'; } $retval .= '</ul></div>'; $retval .= '<h4>Price</h4><div class="row"><div class="span2">'; $price = get_post_meta($room[$i]->ID, 'Price', true); $retval .= '<div class="price-info"><span class="price">'.$price.'</span> / night</div></div>'; $retval .= '<div class="span2 text-right"><a href="#" class="btn btn-primary">Book This Room</a>'; $retval .= '</div></div></div>'; } $retval .= '</div>'; return $retval; } add_shortcode ( 'slide', 'sunshine_slide');
Forum: Plugins
In reply to: [Multiple Post Thumbnails] Display multiple post into shortcodethis my function shortcode