Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

Njones35 / Last Updated July 26, 2021

Insert Adverts Between Posts in Formidable Views

Does your website use advertising? Did you know you can insert adverts between posts? This tutorial will show you just how to do that.


How to insert WordPress ads in Formidable Views

If your website leverages WordPress ads, the announcement about a new shortcode for incremental content in version 3.0 will have caught your attention. This tutorial will show you how to maximize this shortcode, and insert ads between posts in Formidable Views, both incrementally and recurring.

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!

This feature was born from user requests wanting to know how to add custom ads within the content.

Some users wanted an advert after three entries, and maybe another after the tenth entry. Some wanted to add layout elements after specific entries to build a custom page grid or design. Or others wanted the first entry to show different content or different styling.

Do you have a business directory and want to show a banner ad after every 5th business listing? With this feature, you can do just that. Read on to find out how you can insert ads within your post content in WordPress and how to add custom ads in WordPress.

The ability to add incremental content or adverts in Formidable Views has many benefits. We were delighted to announce the [entry_position] shortcode last year. Finally, it's time to give this feature the fanfare it deserves!

Two ways to use incremental content on your WordPress site

Adverts in Formidable Views real estate

There are two ways that you can insert incremental content in Formidable Views. Here's how to place the ad code in between the HTML of your content feed.

On its own, the [entry_position] shortcode can be used to place adverts or extra content in specific positions. This is perfect if you want to highlight the first entry with different styling.

Because the [entry_position] shortcode does not automatically repeat, you will need to add a new condition for each section of content you require.

If you have a lot of entries displayed in your View, you may also want this content to recur automatically.

Another new feature is the ability to combine the [entry_position] and frm_condition shortcodes. This means you can set your incremental content to automatically recur, saving valuable time!

How to insert an ad one time within the entry loop

The [entry_position] shortcode gives you a simple way to add extra content at specific positions within your View. It is especially useful for Views that display a small number of entries, and where incremental content does not need to automatically repeat.

Use this code at the bottom of your View content to insert an advert after the 3rd entry:

[if entry_position equals=3]Include an ad here[/if entry_position]

The same method also allows you to highlight or feature the first entry in a View. Add classes or inline styling to specific entries to style your View:

[if entry_position equals=1]<div class="featured">This is the first entry. It gets more space.</div>[/if entry_position]
[if entry_position not_equal=1]This is not the first entry.[/if entry_position]

This new shortcode also supports less_than and greater_than conditions. Use these options to feature the first three entries in a View this way:

[if entry_position less_than=4]<div class="featured">This is a featured entry. It gets more space.</div>[/if entry_position]
[if entry_position greater_than=3]This is not a featured entry.[/if entry_position]

Recurring, incremental content made easy

If your View displays a lot of entries, regular incremental content would mean lots of added code. Things can get a bit messy if you use a new [entry_position] shortcode for each content insertion.

Automatically recurring, incremental content is the answer!

Combining the frm-condition shortcode with [entry_position] allows some interesting possibilities.

To add additional content on every 3rd entry in your View, see the example below. This can be modified to repeat at whatever interval you wish.

[frm-condition source=frm-math decimal=1 content="[entry_position] / 3" like=".0"]This is the incremental content[/frm-condition]

How does it work?

The principle behind this code is that the [entry_position] shortcode will always return a whole number. If you want your incremental content to display every third entry, you simply divide this number by three. This is seen in the "[entry_position] / 3" part of the above code. Feel free to change this number to suit your requirements.

The frm-condition shortcode checks this returned value against the like=".0" parameter. When the entry returns a figure matching this parameter, (any whole number), the additional content will be inserted.

Because of the decimal=1 parameter, the first and second entries will return values with a number after the decimal point that do not match the condition. The third entry will return a value of 1.0 which is a match for the like=".0" condition. The value will match for every whole number - in this case that will happen every third entry.


How can ads in Formidable Views power your WordPress site?

Insert adverts between posts in your existing Views with ease! There's no need to redesign or rebuild your Views, because this feature can be dropped directly into your existing system.

Not using Formidable Forms yet? Learn more about the features that make Formidable Forms the best online form builder plugin.

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Leave a Reply Cancel reply

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

Get Email Updates

Popular Resources

    • How to Create a Searchable Database on a WordPress Site
    • Create a WordPress Custom Calculator: Easy, Powerful Results
    • How to Create a Fitness Tracker in WordPress
    • Formidable Views: The Best WordPress Custom Application Plugin
    • How To Require Email To Download Files in WordPress
    • How to Create Conditional Drop Down Lists in WordPress Forms
    • The Best Gravity Forms Alternative: Formidable Forms vs Gravity Forms
    • How to Make a Quiz in WordPress
    • WPForms Alternative: Formidable Forms vs. WPForms Compared

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews