How to support responsive viewport in genesis

Responsive is one of the most important features of any modern website. A responsive website responds on to most of the modern devices. Responsive websites provide a smart presentation to all users.

So, to support responsive viewport in your website is mandatory and you can’t skip it at all if you want to represent your websites to all users who are using a modern device.

Benefits to support responsive viewport

Benefits to support responsive viewport in your website is a lot. It increases the readability of your website content to the readers. Because all users of different devices can read your website easily.

In google search indexing, this responsive viewport plays an important role. It helps to generate more traffic and to get a better rank in google search engine.

So, to get a better result of your website, supporting responsive viewport is needed.

How to support responsive viewport in Genesis?

Now, I hope you are interested in supporting responsive viewport in your Genesis child theme. It is very simple to support in your child theme. However, make your that your child theme is ready to support it.

If you don’t make ready your child theme and need more guideline, you can follow this article. You also should know about Genesis hooks and how to use the theme. You can read this article to read about how to use genesis hooks and filters.

I hope your child theme is ready and you know about Genesis hooks and filters. Now, simply add the following codes in the functions.php file-

<?php 
add_theme_support( 'genesis-responsive-viewport' );

This code snippets must be inside the initial hooks or after_setup_theme. If you don’t have this hook in your functions.php file, add the following codes with this hook-

<?php 
function wpq_theme_support(){
  add_theme_support( 'genesis-responsive-viewport' ); 
}
add_action('init','wpq_theme_support');

Or you can use it using the after_setup_theme hook. Like this-

<?php 
function wpq_theme_support(){
  add_theme_support( 'genesis-responsive-viewport' ); 
}
add_action('after_setup_theme','wpq_theme_support');

You can also check the main code snippets from the official site of StudioPress.

Now, your site is supported with the responsive viewport. Just enjoy it.


Leave a Reply

Your email address will not be published. Required fields are marked *

I am available for freelance work

Let's start a project with the best services and full satisfaction guaranteed. Clean and standard coding. Best service is the goal of this project.

Hire Me

Message Me