You use get_header()
in the after_setup_theme
.
The get_header()
function should be used only in theme template files, not directly in the after_setup_theme
hook.
Does the theme work now?
Related Posts:
- Is having multiple theme customizers for different pages possible?
- How to export/import theme customizer settings?
- reason of splitting theme files to multiple files
- How to get the registered sidebar’s name by its id?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- One button to change all settings in theme customizer?
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- Design view breaking on Pages
- Use different javascript files for each page on website
- How to get custom image size for image uploaded in Customizer
- Passing array in add_option()
- Widgets not showing in my custom theme
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- Changing the template hierarchy
- Can’t load WP function into external function
- Set WordPress Default Template
- Customizer: Output default value in Customizer CSS
- WordPress does not load page.php, return 404.php
- adding custom user input fields in WordPress admin dashboard gives error The link you followed has expired. Please try again
- Customizer: active_callback and sanitize_callback incompatibility?
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- How do I link a button I created in theme customizer to a function?
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- What does this mean in wordpress? Easy question
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Reason to add a name of the theme like (‘menu-1’ => __( ‘Primary’, ‘twentynineteen’ ),) in PHP?
- Separation of presentation and code – WordPress
- WordPress Customizer Default Image
- Why in my theme I can’t see all the statics content under the posts?
- get_template_directory adding FTP root folders in urls
- How to add the sidebar to all the pages except the home page? [closed]
- Header not properly displaying on archive.php
- Save Custom CSS file in the upload folder dynamically?
- Warning: printf(): Too few arguments in helpers.php file
- home.php show blog posts as grid view
- How to Update an old theme for the latest wordpress version
- get_comments_number() returns 0
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- Why in this WordPress theme I can’t see the Main Menu?
- How can I assign separate stylesheets to different pages?
- How to make sure relative URL works when site is not on root domain?
- Commas in Tag Cloud
- WordPress redirects page query parameter in URL
- Dynamically switch file in get_template_directory_uri() | Function [closed]
- Uncaught TypeError: extract(): Argument #1 ($array) must be of type array, null given
- Not able to remove caption shortcode from the content
- When I click for the redirect link it is showing the content of index.php instead of single_assignment_page.php
- Unable to retrieve get_author_posts_url
- Display post date also if the date it’s the same for each post
- WordPress child theme, creating a custom php template page
- Menu to the right of screen on desktop using Bootstrap 4
- How to add Open/Close Toggle button into Twenty Fifteen theme for hiding left sidebar?
- Use Custiomizer to setup meta theme color tag
- Rotating Header Images
- Create a custom theme-specific page, invisible in the admin-panel?
- WP Knowledge Base Theme bug – Subcategories and Articles, Need to change WP_Query
- Image not displayed
- Predefine Magazine Style Layouts
- How to store the_post_thumbnail() value in a variable
- Font Awesome Icons as squares [closed]
- Gulp dev environment set up for WordPress theme development
- What is considered good practice for registering menu locations?
- PHP unit testing WordPress?
- List of all theme customizer control types?
- Replacing mysql_real_escape_string in WordPress theme
- Multiple do_shortcode($content) within one shortcode
- Fatal error: Call to undefined function wpsc_cart_item_count()
- What is the fastest way to load PHP functions that are only used in one theme template?
- How do I access the media settings
- How can i upload images in an admin page?
- Wp-login appears White Screen, Error: Cannot modify header information
- WordPress: Access a plugin from within a theme
- Need Help Fixing My Iframes [closed]
- My page.php shows the index.php
- How to change theme programmatically from a external application?
- can i fetch a custom metabox data in another page or post type?
- ‘Post-thumbnails’ feature does not seem to register
- Search form does not work in my website
- Adding Updated Post Date PHP Custom Theme
- Search only working on front page (index) , not working on other pages
- ‘Bones’ theme: Load stock scripts in footer instead of header?
- call a string/function from database
- How do I use an iFrame for my header in WordPress twenty seventeen?
- How do I edit the terms output args or array data?
- How to use data URL in WordPress?
- How can I prevent a shortcode div from extending beyond its boundaries?
- Should I set a page as “No-index” if I include it’s content within the front-Page.php via this method?
- How to get Post sidebar & footer including html like get_the_content() which only gets content section?
- Beginner Developing Theme with Bootstrap – NavMenu question
- Local WordPress from Git repo, where to set document root?
- Custom theme: adding unwanted tags in the content
- Relative post date in recent posts list
- Include a php file that is above WP installation hierarchically?
- How to implement conditional PHP in Footer
- WordPress menu links with images & class selection
- Pagination not working properly
- How can I fix my pagination?
- How to remove the intro animation which appears during the load up of some WordPress themes? [closed]
- How to hide header and footer from page template
- Adding features to Gutenberg without theme.json