Understanding WordPress theme files and underscores

1) Why when I’m adressing mysite.com/index.php I see the text I’ve entered while creating the page, but there’s no code for that in the index.php file? You’ve assigned page1 as your Front Page so this displays instead of the index.php. You will need to create a page template: https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/ if you want to edit the … Read more

Missing hashtag with theme customizer header color

Already fixed it. When saving it to the database the hashtag is filtered out. So with echoing the color, I just put a hashtag before it, like this: function cloudboxx_customize_register( $wp_customize ) { //All our sections, settings, and controls will be added here $wp_customize->add_setting( ‘header_textcolor’ , array( ‘default’ => “#000000”, ‘transport’ => ‘refresh’, ) ); … Read more

Load get_page_templates into select menu

Reading the documentation: List of choices for ‘radio’ or ‘select’ type controls, where values are the keys, and labels are the values. And again for get_page_templates(): Return value: (array) Where key is the name of the template and value is the filename. Thus we can conclude: ‘choices’ => array_flip( get_page_templates() ), Now I’m spoiling you