How to load jquery tag-it plugin into admin?
How to load jquery tag-it plugin into admin?
How to load jquery tag-it plugin into admin?
$the_args = array ( ‘post_type’ => ‘jobs’, the_field(‘job_category’) ); The trouble here is that the_field( ‘job_category’ ) prints data, so using it to build an array is pretty much useless. You’re left with literally post_type = job. However, the real problem is that you actually need to grab the category options, not the posts that … Read more
You can make specific pages (like landing pages) and call a specific header (or footer) template (i.e. header-authorPaul.php) by calling get_header ( “authorPaul” ); and then verifying that the author has post(s). Show the last one(s) if any. The same goes for archives.
Just switch conditionally. The rewind_posts() function allows you to loop through the same loop a second time, while the has_term() function allows you to check if the currently looped post has a specific term of a specific taxonomy. if ( have_posts() ) { while ( have_posts() ) { the_post(); if ( ! has_term( ‘term_A_slug/term_A_id’, ‘taxonomy’ … Read more
You can do it in many ways. Two solutions I recommend are: 1. Editing category template Just edit your category.php template and put if statement in there: if ( is_category( array(15, 19) ) ) get_template_part(‘category-15-19’); else get_template_part(‘category-all’) Then just put code for category 15 and 19 into category-15-19.php file and code for other categories into … Read more
Ajax call activate after submit in edit-tags.php page
Page redirecting to category (IE only)
You can follow different approaches, I will show you a simple one, that hooks into wp_footer action. The lack of this approach is that it slows down the page loading. To avoid this lack you can use the same logic but implemented via ajax. So, you can use an option to store category popularity, it … Read more
You must use get_terms in order to obtain all the “categories” of a custom taxonomy. http://codex.wordpress.org/Function_Reference/get_terms
<?php $categories=get_categories(”); foreach($categories as $category) { echo ‘<p>Category: <a href=”‘ . get_category_link( $category->term_id ) . ‘” title=”‘ . sprintf( __( “View all posts in %s” ), $category->name ) . ‘” ‘ . ‘>’ . $category->name.'</a> </p> ‘; echo ‘<p> Cat ID: ‘. $category->cat_ID. ‘</p>’; // The Query $id_cat = $category->cat_ID; $args = array( ‘cat’ => … Read more