My Query is getting the wrong data

$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

Archives and category of authors

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.

Show one same template for two category

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

Get post by Category in custom template

<?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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)