Group Rotation
-
Hi,
I’m asking for your expert help in solving the following task correctly.
It is necessary to rotate
head_code_1
andhead_code_2
in <head> of page.
In this case, ifhead_code_1
is selected, it is necessary to implement the mandatory insertion of ALL other codes on the page, while ifhead_code_2
is selected, it is not necessary to do this.Let the codes to be inserted into the page are as follows:
page_code_1
(after the first paragraph)page_code_2
(in the middle of the page)page_code_3
(after the content)page_code_4
(in the footer).
First, in Settings I set a new hook (named Header) for the action wp_head.
Then I created next blocks:
BLOCK 1 — must be inserted before all other blocks used for group rotation
[ADINSERTER ROTATE share="50"] [ADINSERTER group="head_code_1"] [ADINSERTER ROTATE] [ADINSERTER group="head_code_2"]
BLOCK 2 — code for insertion into <head> of page (Insertion: Header)
[ADINSERTER ROTATE group="head_code_1"] head_code_1 [ADINSERTER ROTATE group="head_code_2"] head_code_2
BLOCK 3 — code for insertion after paragraph 1 (Insertion: After paragraph 1)
[ADINSERTER ROTATE group="head_code_1"] page_code_1 [ADINSERTER ROTATE group="head_code_2"] nothing
BLOCK 4 — code for insertion in the middle of the page (Insertion: After paragraph 0.5)
[ADINSERTER ROTATE group="head_code_1"] page_code_2 [ADINSERTER ROTATE group="head_code_2"] nothing
BLOCK 5 — code for insertion after content (Insertion: After content)
[ADINSERTER ROTATE group="head_code_1"] page_code_3 [ADINSERTER ROTATE group="head_code_2"] nothing
BLOCK 6 — code for insertion into footer (Insertion: Footer)
[ADINSERTER ROTATE group="head_code_1"] page_code_4 [ADINSERTER ROTATE group="head_code_2"] nothing
Please give your answer to two questions.
1. Did I set the logic in Blocks 1-6 correctly?
2. What to do with Block 1, which is responsible for group rotation?
Because according to https://adinserter.pro/documentation/ad-rotation#groups manual in case of client-side dynamic blocks there is no possibility to specify Block 1 insertion into <head>.
But Block 1 must regulate the group rotation insertion as well as Block 2 into <head> and Blocks 3-6 into <body>.Thank you in advance for your informative answers.
- The topic ‘Group Rotation’ is closed to new replies.