The meta tag should get inserted in the <head>
section of a website. Regardless if you are using a header.php
and footer.php
or not, you should have a <head>
section in your document.
For example the code in your document should be something like:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
Also make sure you are using <?php wp_head(); ?>
(before closing </head>
section) and <?php wp_footer(); ?>
(before closing </body>
section) in your theme, as nearly all plugins depend on these. As this codes are default in the header.php
and footer.php
files.
I guess that is no real WP question it just seems about the meta tag and section.
Related Posts:
- How can I set image sizes and still have responsive images using the srcset attribute?
- Excess White Space Above Admin Bar on Frontend Using Twitter Bootstrap
- Featured Image in 4.4 should be larger on mobile device
- How to use the responsive images feature from WP 4.4 in your themes
- What tags should be used for themes to show the type of layout?
- Can’t show custom post thumbnail sizes as background images
- How to make wordpress theme iframe responsive
- Responsive Images – crop don’t seem to work
- Custom image size vs CSS sizing
- Change Responsive Images Maximum Width of 1600px
- Change Image Sizes for Mobile Theme
- add class to all images inside the content
- Menu is in Reversed order
- Responsive Images with art direction
- Should I detect the device or the page first?
- FitVid not working for iframes on particular theme install
- Set start page depending on screen width [closed]
- How to resize video lightbox popup in wordpress? [closed]
- Elementor Pro and Astra have different breakpoints – how to salvage?
- Correct way to make a custom block theme responsive
- How do I work with responsive images in WordPress? (img srcset/sizes)
- Software for WordPress Theme and Plugin Development? [closed]
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- Reset positions of metaboxes in admin
- Add a dropdown to theme customizer
- design and development workflow
- How to control initial wp_head() output?
- enqueue script for specific shortcode
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- WordPress twentytwenty theme inline css overriding css body
- How can I insert default widgets when my theme is activated (similar to what twenty eleven does)?
- Why might $input (Settings API) be coming through empty?
- add generated stylesheet from parent theme after child-themes style.css
- date_i18n() issue
- How to check if post has any tag?
- Merging PHP download script into `functions.php`
- Should use widgets in this case?
- Changing the entire control choices using wp.customize with JavaScript
- Static Front Page problem
- Get last modified date for menu link
- A theme that follows all the best practices to learn from?
- get_post() function returns post even if it is trashed
- WordPress how to override function adjacent_posts_rel_link_wp_head() in link-template.php the correct way
- Can wordpress run in root of existing php site with no theme on index.php but all other WP posts/pages?
- How to regenerate thumbnails when they’re stored on S3
- CSS won’t style output of wp_nav_menu() correctly
- after_setup_theme, Global Variable and Theme Customizer
- How to make WP admin recognize a newly created child theme?
- searchform.php override not working
- How to move the the_excerpt’s read more link to another div
- How to create a custom template to admin dashboard
- Change The Meta-Description Of Home-Page?
- Easy lightbox effect inside of dashboard widget
- Add, edit specific CPT with custom role
- how to display search term in the template full site editor
- How to add new page to wordpress theme through coding?
- Dynamically generated wordpress customizer options?
- Filter categories used with Custom Structure Permalink
- Code to determine WP version check
- How to escape html generate by a loop
- get_term_link is Ending to single.php
- making my theme multisite compatible?
- wp e-commerce – theme problem – why won’t it load wpsc-single_product.php? [closed]
- Extending Twenty Eleven Theme
- Moving post title down the page / Removing a block from a post
- I want to change background image of my wordpress site on particular post type
- how to retrieve the image title for image Post Format
- Iris color picker in custom theme option page not saving value
- Hestia Child theme creation
- How to add custom class to get_avatar()
- Want to add cart and a search bar in the right of logo line
- Twenty Twelve Author not displaying
- Default PHP document / names needed for a WordPress theme?
- How can I sort my loop based on meta data, using a form?
- What is the_permalink() on a category page?
- How to modify theme content in Thematic?
- How to determine when my theme is deactivated?
- 1 post per category on homepage and counting those posts
- Custom themes that won’t work when theme is changed
- only the first post is shown
- wordpress can’t find single-project page
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- How to show some of category in wordpress
- How to make the media library searchable by image title
- How do I build a WordPress Profile/Author Header?
- Custom page template not showing on page creation
- Create settings field on button click
- Undefined index: custom_sidebars
- How To Customise WordPress Comment Submit Button?
- Next/Previous post navigation
- Single Featured Image Repeating
- How to remove menu from WP-Admin menu
- apply_filters to featured image
- How do I move menu to the bottom in Custom Community theme?
- How do I get information about a page, such as featured image, except, and title?
- How can I install my custom-made theme on a wordpress.com blog? [closed]
- A problem in loading index.php
- .submenu class missing in output from wp_nav_menu
- How to Enable Hot Module Replacement with Webpack