mostrar el tipo de publicación personalizado con la categoría de opción de obtención

My old code before I created custom post type:

<?php $featured_category = of_get_option('kategori_1'); ?>
<?php $category = get_cat_name($featured_category); ?>
<div class="featured-title">
<h4>
    <a href="<?php echo get_category_link($featured_category);?>">
       <?php echo $category; ?>
    </a>
</h4>
</div>

<?php 
global $post; 
$category_id = of_get_option('kategori_1');
$my_query = new WP_Query('cat='. $category_id . '&' . 'offset=' . '&' . 'showposts='. '4');

while ($my_query->have_posts()) {
   $my_query->the_post(); 
   $do_not_duplicate = $post->ID; 
   /*my content */
} ?>

Now I have created a custom post type with name 'product'. My question is how can I display my post with get_option by category like in the old code?

preguntado el 15 de noviembre de 13 a las 08:11

Your question is not clear for me. -

i'm sorry.. my english very bad, basicly i need to display my post from wp custom_post_type by category with featured category get_option -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.