What is the advantage of using header-catname.php over is_category(‘catname’);?

Let’s say I have a category named as catname (the slug would be catname). I want the header styled differently when visitors open the category catname. The article on Ghacks explains how to create a custom header (styled differently) when visitors open the category catname, achieved by creating header-catname.php and including it in category-catname.php with … Read more

What’s the proper way to use a custom table? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago. Improve this question I manually added a table to my wordpress database using sql using CREATE TABLE. I … Read more

get_terms return errors

Hi when i try to get_terms(); in theme options via this code $catalogs_terms = get_terms( ‘catalogs’ ); $mycatalogs = array( -1 => ‘Select a catalog’ ); if ( $catalogs_terms ) { foreach ( $catalogs_terms as $catalog_term ) { $mycatalogs[$catalog_term->term_id] = $catalog_term->name; } } return empty but this code is working fine every where in pages … Read more

Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 7 years ago. Improve this question I am pretty new in WordPress and PHP development (I came from Java and C#) and … Read more

Customizer API and add_panel(). Panel doesn’t show

I try to add panel to my customizer but code below doesn’t work (panel don’t show in customizer container). My code: add_action( ‘customize_register’, ‘customizer_test’ ); function customizer_test($wp_customize) { $wp_customize->add_panel( ‘panel_id’, array( ‘priority’ => 10, ‘capability’ => ‘edit_theme_options’, ‘title’ => __(‘Theme Options’, ‘mytheme’), ‘description’ => __(‘Several settings pertaining my theme’, ‘mytheme’), ) ); //sections $wp_customize->add_section( ‘header_settings’, … Read more