• Resolved linus0f

    (@linus0f)


    Hi,

    first of all: great plugin! I’ve been using it to insert ads automatically after N paragraphs. Works perfectly.

    In some rare cases it would be nice to be able to adjust the automated insertion by 1 or 2 paragraphs, definable by the post author on a per post basis.

    Is there any way to achieve this? Say by adding a ACF custom option “offset” to the post editor. And then checking that offset in some Ad Inserter filter/hook and eventually modifying the paragraph number the ad will be inserted at?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Spacetime

    (@spacetime)

    Hello,

    thanks for the proposal.

    Can you please be more specific and describe some example?

    Thread Starter linus0f

    (@linus0f)

    Hi, sure:

    Ad block 1 is active on posts, set to insertion after paragraph 5, counting from top. In some cases, the author might want the ad inserted after paragraph 4 or 6 instead (depending on text, for better reading flow).

    Now, we imagine to add a simple drop down with ACF to the post editor. The author could select an integer, let’s say from -2 to +2, when editing the post. The question was if we could supply this value to an Ad Inserter function, which then offsets the automated insertion by this amount of paragraphs. So for example, if the author chooses “-1” in the drop down, the ad block would be inserted after the 4th paragraph instead of the 5th.

    As I understand it would be possible to insert ads with a short code – though I think a user with author role can’t disable automated insertion for specific posts, so then two ads would be displayed?

    Thanks for any advice!

    Edit: Would also be nice for percentage based paragraph insertion. For example, insertion is after 0.2 of paragraphs, and author could bump the ad spot up or down one or two paragraphs.

    • This reply was modified 2 years, 8 months ago by linus0f.
    Plugin Author Spacetime

    (@spacetime)

    Ok, now it is clear. I will put this on the todo list. Thanks for the suggestion.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Automated insertion: add custom offset in post’ is closed to new replies.