lorenzoporretti
Forum Replies Created
-
I find this:
https://tareq.wedevs.com/2012/04/how-to-extend-wp-user-frontend/ (the author of plugin)
and this:
https://shibashake.com/wordpress-theme/add-term-or-taxonomy-meta-data
… but I was not able to understand much about …ok, you can create a custom template for this! as
listing-category.php
the code:<?php /* Template Name: Listing Category */ ?> <?php get_header(); ?> $args = array( 'post_type' => 'listing', 'cat=3', 'posts_per_page' => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_title(); echo '<div class="entry-content">'; the_content(); echo '</div>'; endwhile; <?php get_footer(); ?>
‘cat=3’, is the category number to display.
I don’t understand your problem… (I do not speak English very well)
(listing is not a category)Hi Rolf, this is the loop for the post type:
$args = array( 'post_type' => 'listing', 'posts_per_page' => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_title(); echo '<div class="entry-content">'; the_content(); echo '</div>'; endwhile;
(But your is an a different question)
ok in my theme i use this:
// Include & setup custom metabox and fields$prefix = '_ct_'; // start with an underscore to hide fields from custom fields list add_filter( 'cmb_meta_boxes', 'ct_metaboxes' ); function ct_metaboxes( $meta_boxes ) { global $prefix; $meta_boxes[] = array( 'id' => 'listing_info', 'title' => 'Listing Info', 'pages' => array('listings'), // post type 'context' => 'normal', 'priority' => 'high', 'show_names' => false, // Show field names on the left 'fields' => array( array( 'name' => 'Price', 'desc' => 'Enter the price here, without commas or seperators.', 'id' => $prefix . 'price', 'type' => 'text_money' ),
exc..
I believe that one problem is the prefix of METABOX, what do you think? and other mistakes you see?Ok sorry for the post type is ok! I use: [wpuf_addpost post_type=”event”]
But for Custom Meta Box?