loading custom registration template

Be sure to link that page in your functions page require_once(‘custom-register.php’) cp_head(__(‘Register’,’cp’)); ?> <?php cp_show_errors($errors); ?> <div class=”alert alert”><a class=”close” data-dismiss=”alert”>×</a><strong>Welcome: </strong> <?php _e(‘Complete the fields below to become a member.’, ‘cp’) ?> </div> <div class=”alert alert-info”><a class=”close” data-dismiss=”alert”>×</a><strong>Information: </strong> <?php _e(‘Your password will be mailed to you so use valid email address.’, ‘cp’) ?> … Read more

How to define the template priority between built-in categories and custom taxonomies?

You can tell WordPress what template file to use with the template_redirect hook. add_action( ‘template_redirect’, ‘wpse98738_taxonomy_redirect’ ); function wpse98738_taxonomy_redirect() { if( ‘x’ == $customtax && ‘y’ == $category_name ) { include( get_template_directory() . ‘/taxonomy-customtax.php’ ); // if you’re using a Child Theme, use the following line instead: // include( get_stylesheet_directory() . ‘/taxonomy-customtax.php’ ); exit; // … Read more

Archive-custome_post.php template not working

Your pre_get_posts filter is incorrect. You are altering more queries than I think you think you are. The “main” query isn’t just the primary index. You are adding (or attempting to add) all of those post types to every page, basically,– the author archives, the categories, everything. Try this: add_action( ‘pre_get_posts’, ‘add_my_post_types_to_query’ ); function add_my_post_types_to_query( … Read more

Custom term templates

If you look at the template hierarchy, you need to create a template taxonomy-{$taxonomy}-{$term}.php. In your case, that template will be called taxonomy-product_cat-awesome.php where I assumed the slug of your term is awesome Just a tip, the “categories” of a custom taxonomy is called terms. The build in taxonomy category “categories” is also called terms, … Read more

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