Tag Info

Hot answers tagged

3

Step 1 Start by making an Advanced Search Form with which you want your user will interact with the website, and save it with a name (i.e. I saved it as advanced-searchform.php — but don't save it with searchform.php then it'll replace the WordPress' default search form): <form method="get" id="advanced-searchform" role="search" action="<?php ...


2

Yes, you need to write code to populate it. This is untested but should work. add_filter('manage_edit-cpt_roundtable_columns', 'init_roundtable_custom_columns'); function init_roundtable_custom_columns($columns) { return array( 'cb' => '<input type="checkbox" />', 'title' => __('Title'), 'taxonomy-sessions' => ...


2

This is a known bug (or design flaw) that seems be getting some attention by the Wordpress team. Take a look at this discussion https://core.trac.wordpress.org/ticket/18962 for more information. As of Wordpress 4.0 this is still an issue.


1

Found the basis of the answer buried in the codex $args = array( 'post_type' => 'case_studies'); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_ID(); endwhile;


1

There are couple of issues in your query. There is not parameter named category. You can use these following. cat (int) - use category id. category_name (string) - use category slug (NOT name). category__and (array) - use category id. category__in (array) - use category id. category__not_in (array) - use category id. If you need your query to paginate ...


1

I think you could do this with one template such as single-property.php. As Sanchy recommended you would want categories for "sale" and "rental." You would also want custom fields for the data. The Advanced Custom Fields Plug-in makes it easy to add those. https://wordpress.org/plugins/advanced-custom-fields/ Add all the ones you would want for both rental ...


1

From your comments, this only happens when the fields are left empty. This means that the particular field does not get set. As stated in my comments, you should first check if a field is set before you try to use it. In the first block of code, you have the following three lines <td><input type="text" class="widefat" name="name[]" ...


1

There seemed to be an issue with the way you registered the taxonomy. I prefer to register the taxonomy first, before registering the post type. I submitted a pull request but here ya go: <?php // hook into the init action and call create_book_taxonomies when it fires add_action( 'init', 'create_ksasexhibits_taxonomies', 0 ); // create two ...


1

You specify supported taxonomies right there: 'taxonomies' => array( 'category', 'post_tag' ), If you want different set you should configure it accordingly. Possibly registering custom taxonomies if that is what needed.



Only top voted, non community-wiki answers of a minimum length are eligible