A feed set to 100% width can still be constrained by your theme. Theme changes that let it span the full page.
Would you like your Instagram feed to span the whole width of your page in a single row?
In this guide, we’ll show you how to set up a single row in the feed customizer and how to get past the width limits your theme may add. We’ll also cover the space between posts and the settings for mobile screens.
Before you get started, make sure Instagram Feed is installed and activated on your WordPress site.
- Creating a Single Row
- Making the Feed Wider Than Your Theme’s Content Area
- Adding a Gap Between Posts
- Showing Fewer Posts on Mobile
- Frequently Asked Questions
Creating a Single Row
To get started, we’ll set the feed to show all of its posts in one row.
A feed shows a single row when Number of Posts and Columns have the same value. For example, six posts in six columns make one row of six. The Columns setting goes up to ten, so a single row holds up to ten posts. Columns also sets the columns for the Masonry and Highlight layouts.
With the Plus license level or higher, the Simple Row template also sets up one row of five posts with no space between them, as we explain in our guide on using Instagram Feed templates and themes.
- To start, go to Instagram Feed » All Feeds in your WordPress admin sidebar. Then click the pencil icon next to the feed you want to change.
- Next, click the Customize tab in the customizer. Then click Feed Layout.
- Under Number of Posts, enter the number of posts you want in the row in the Desktop field.
- Under Columns, choose the same number from the Desktop dropdown.
- If you want one row on tablets too, choose the same number from the Tablet dropdown under Columns. Tablets use the desktop number of posts.
- When you’re done, click Save.
Mobile screens have their own settings, so a single row on a phone needs the Mobile fields set the same way. A long row of small photos can be hard to see on a phone, so you may want fewer posts there. We cover both in Showing Fewer Posts on Mobile below.
If your feed shows a Load More button, a click on it adds posts below your row. To keep a single row, see how to turn off Load More in the FAQ below.
If the row still stops short of the edges of your page, your theme is probably limiting the width. Next, we’ll look at how to fix that.
Making the Feed Wider Than Your Theme’s Content Area
To fix a narrow feed, we’ll find the part of your theme that limits it and widen that part with a little CSS.
The feed fills the width of the space it sits in, because the plugin sets the feed container to 100% width. So the width comes from your theme, not from a feed setting. When the feed stops short of the page edges, an element around it, such as a content area or a widget area, is limiting the width.
Next, add your CSS in a snippet with WPCode, or in your theme’s Additional CSS area. If you’ve never added CSS to WordPress, see How to Easily Add Custom CSS to Your WordPress Site.
- To start, right-click your feed on the page and choose Inspect. The exact name varies a little by browser. If you haven’t used this tool before, see Basics of Inspect Element for WordPress.
- Next, look at the elements that wrap around the feed in the panel that opens. Find the one that limits the width. For example, a theme might wrap the feed in an element with the class
widgets-wrapand the propertywidth: 50%. The class in your theme will have its own name. - Once you’ve found that element, copy its class or ID.
- After that, add the CSS below in a WPCode snippet or in your theme’s Additional CSS. Then use the class or ID you copied in place of
.widgets-wrap. Start a class name with a period and an ID with#, or the CSS won’t apply.
- When you’re done, save the snippet or your CSS, and refresh the page to check the width.
This CSS forces the element to full width. The !important keeps your theme’s own rules from overriding it.
.widgets-wrap {
width: 100% !important;
}
You may need to repeat the steps for other elements in your theme that limit the width. You might also need to remove the padding and margin on the wrapping element. For example, you can try this.
.widgets-wrap {
width: 100% !important;
padding-right: 0 !important;
padding-left: 0 !important;
margin-right: 0 !important;
margin-left: 0 !important;
}
If you have trouble finding the right element or getting the CSS to work, contact your theme’s author, or contact Instagram Feed support for help.
Next, we’ll look at the space between your posts.
Adding a Gap Between Posts
The Padding setting adds space between your posts. It works the same way in every layout, including Carousel. The space between two posts is twice the Padding value, so a Padding of 5 leaves 10 pixels between them.
- To start, go to Instagram Feed » All Feeds. Then click the pencil icon next to the feed you want to change.
- Next, click the Customize tab. Then click Feed Layout.
- In the Padding field, enter the number of pixels you want.
- When you’re done, click Save.
Next, we’ll look at how many posts your feed shows on mobile.
Showing Fewer Posts on Mobile
Number of Posts has two values, one for desktop and one for mobile. On a screen narrower than about 480 pixels, the feed hides the posts beyond the mobile number. In the free plugin, a new feed starts with 20 for both and one column on mobile, so on a phone those posts sit one above the other. A lower Mobile value gives visitors a shorter feed to scroll.
- To start, go to Instagram Feed » All Feeds. Then click the pencil icon next to the feed you want to change.
- Next, click the Customize tab. Then click Feed Layout.
- Under Number of Posts, enter the number of posts you want to show on mobile in the Mobile field.
- If you want those posts in a single row on phones, choose the same number from the Mobile dropdown under Columns. With one column on mobile, the posts stack on top of each other.
- When you’re done, click Save.
That’s it! Your feed now has a single row, and you control its width, spacing, and mobile posts. If you’d rather have visitors scroll a single row sideways, see our guide on auto-rotating your feed as a carousel.
Frequently Asked Questions
Below, we’ve answered some of the most common questions about feed width and layout.
Can I disable the mobile layout of my feed?
Yes. In the customizer, go to Customize » Feed Layout. Under Columns, choose the same number in the Mobile dropdown as in the Desktop dropdown. Then click Save. The feed keeps its desktop number of columns on phones. The same works with the Tablet dropdown if you want tablets to match.
How wide is my feed by default?
The feed fills the width of the space it sits in, so there is no width value to set in the customizer. To make that space wider, see Making the Feed Wider Than Your Theme’s Content Area.
Can I use the Carousel layout for a single row?
Yes. In Carousel Settings, set Rows to 1, and the carousel shows a single row. For the full setup, see our guide on auto-rotating your feed as a carousel. Carousel needs Instagram Feed Pro with a Basic license or higher. The free plugin shows it as a Pro layout.
Can I stop my single row from growing when visitors click Load More?
Yes. A Load More button loads more posts below the ones already showing, so the feed grows past one row. To remove the button, go to Customize » Load More Button in the customizer, turn off Enable, and click Save. To change the button’s text and colors instead, see our guide on setting up the Load More button and Infinite Scroll.