Different layout on second page

To load override WordPress’ choice of template you can use template_include filter and then use the locate_template to return the the template file path (if it finds it). The file-name passed to locate_template must be the name of the template file name (which should be in you theme/child-theme directory). //Loads template customtemplate.php from your theme … Read more

Taxonomy Drill-Down / Plugin Help – hierarchical queries within plugin?

I had done some work for my upcoming theme which shows category tree (Taxonomy drill down) from custom taxonomy. You can show it on taxonomy page or on category page. if(! defined(‘TH_TAX_TYPE’)) define(‘TH_TAX_TYPE’,’your-tax-type’); function is_decendent($term_id,$main_parent) { $terms= get_term_by(‘id’, $term_id,TH_TAX_TYPE); $parent_term= get_term_by(‘id’, $terms->parent,TH_TAX_TYPE); $grand_parent_term= get_term_by(‘id’,$parent_term->parent,TH_TAX_TYPE); if($terms || $grand_parent_term){ if($grand_parent_term->term_id==$main_parent){ return TRUE; } } return FALSE; } … Read more

Custom Post type & Taxonomy 404

Please replace the “portfolio_create_taxonomy” funcation to below code function portfolio_create_taxonomy() { register_taxonomy( ‘portfolio-category’, array( ‘portfolio’ ), array( ‘hierarchical’ => true, ‘show_ui’ => true, ‘show_admin_column’ => true, ‘query_var’ => true, ‘label’ => __( ‘Category’ ), ‘rewrite’ => array( ‘slug’ => ‘portfolio-category’ ), ‘hierarchical’ => true, ) ); } add_action( ‘init’, ‘portfolio_create_taxonomy’ );

custom post type don’t appear in the home page

Find functions.php in your theme and add this code: function add_custom_pt( $query ) { if ( !is_admin() && $query->is_main_query() ) { $query->set( ‘post_type’, array( ‘post’, ‘cptslug1’, ‘cptslug2’ ) ); } } add_action( ‘pre_get_posts’, ‘add_custom_pt’ ); Change array values to match your post type slugs (add as many as you need), but keep ‘post’.

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