• Resolved zachkinsey

    (@zachkinsey)


    Hey there!

    I’m looking to purchase your plugin, but I can’t get the free version to work how I need it to with Elementor and Advanced Custom Fields.

    Using the Ad Inserter top admin menu within a post, I can get these blocks to show up in place of the Elementor ‘Post Content’ widget: https://gyazo.com/9b783d4f15d149e515f8e3d085f49a16

    However, that widget is only there to not crash the Elementor single post template builder (it needs that widget to function).

    The actual content is inserted through the Advanced Custom Fields plugin, and not through the standard WordPress text editor or Elementor Page Builder.

    I figured that I could still use your plugin to target the paragraphs generated by the Advanced Custom Fields plugin, but as far as I can tell, I cannot.

    The ad test placeholder will show up in the wordpress admin, but won’t show up within the actual single post template.

    Is there any way to get Ad Inserter to target the paragraphs generated by the Advanced Custom Fields plugin?

    The GUI way of targeting paragraphs doesn’t currently work for paragraphs generated by ACF.

    Thx.

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

    (@spacetime)

    Hello,

    the plugin is called by the_content WP filter hook by the theme or content plugins.
    The filter hook passes the generated conetnt to other plugins to be processed – in this case ads inserted.
    Unles this hook is called by the theme (or content plugins) no plugin can process the content:
    https://adinserter.pro/faq/how-ad-inserter-works#automatic-insertion

    However, you can try to use insertion at HTML elements:
    https://adinserter.pro/documentation/insertion-before-inside-after-html-element

    Thread Starter zachkinsey

    (@zachkinsey)

    The insertion by HTML elements has worked. However, as far as I can tell, you cannot insert ads based on every nth HTML element like you can paragraphs. Is there any way to implement the above when targeting HTML elements?

    Thx.

    Plugin Author Spacetime

    (@spacetime)

    Yes.

    You need to target p HTML elemets inside the content container.
    And then

    1) for client-side insertion you can use pseudo selector :eq()

    2) for server-side insertion you can use Filter:
    https://adinserter.pro/documentation/additional-block-settings#filter

    This way you can insert before/after wanted paragraphs.

    Thread Starter zachkinsey

    (@zachkinsey)

    How can we target the div that contains the p tags while using :eq() with Ad Inserter?

    I’m currently trying to target the div container so that Ads are inserted after it, but using .container:eq(2) as the selected element doesn’t insert Ads for every 2nd container.

    After looking into :eq() it seems that it’s a deprecated jQuery selector.

    So, you’re asking me to do something like:

    <script>
    $( “container:eq( 2 )” ).css( “display”, “block” );
    </script>

    ?

    Plugin Author Spacetime

    (@spacetime)

    No, try to use something like “element-selector p:eq(2)” as the selector for the HTML element.

    The best approach is to use server-side insertion – use “element-selector p” for the HTML elements:
    https://adinserter.pro/documentation/insertion-before-inside-after-html-element

    Of course, you need to check your content container and use the right “element-selector” where your paragraphs are located.

    Thread Starter zachkinsey

    (@zachkinsey)

    It works now, much thanks for the quick support!

    For anyone else reading this:

    I only got it to work after setting it to Server-side rendering… though that might be coincidental.

    Before setting it to server-side rendering only 1 Ad placeholder would display. Afterwards, the ads displayed correctly in all areas according to my filter settings.

    Plugin Author Spacetime

    (@spacetime)

    Great!

    It works now, much thanks for the quick support!

    Please say it here:
    https://www.ads-software.com/support/plugin/ad-inserter/reviews/#new-post

    Thank you!

    Thread Starter zachkinsey

    (@zachkinsey)

    Welp… I’m back! So, as it turns out… you’re suppose to use client-side insertion for handling cookie whitelisting for things like GDPR. Since I’m trying to stay GDPR compliant, evidently server side insertion is not an option; which is unfortunate since I can’t seem to get client-side insertion to actually… insert. Plus, I realized that the GDPR plugin I use requires client-side insertion.

    So, the question becomes… how do I get Ad Inserter to work w/ Advanced Custom Fields plugin’s content insertion via client-side Dynamic Blocks and not Server Side?

    Ad Inserter Pro 2.7.12, cbae4d431be737fd

    INSTALLED: 2022-02-16 11:28:26 (0000-01-08 02:02:16, 36 days ago)
    GENERATED (WP time): 2022-03-24 13:30:49
    GENERATED (Server time): 2022-03-24 19:30:49
    PLUGIN CODE PROCESSING: 118.07 ms
    PLUGIN HOOKS PROCESSING: 0.00 ms
    BLOCK CODE PROCESSING: 0.00 ms
    TOTAL PROCESSING TIME: 118.07 ms
    SETTINGS: 2.7.12
    SETTINGS SIZE: 10955
    SETTINGS TIMESTAMP: 2022-03-24 13:17:23
    SETTINGS EXTRACT: 2.7.12-96P
    EXTRACT TIMESTAMP: 2022-03-24 13:17:23
    EXTRACT SOURCE: SAVED SETTINGS
    USER: LOGGED-IN ADMINISTRATOR
    USER ROLES: administrator, tutor_instructor
    MIN.USER FOR EXCEPTIONS: administrator
    PAGE TYPE: POST
    PUBLISHED: 2022-03-21 12:27:06
    ID: 7164 (get_the_ID: 7164, get_queried_object: 7164)
    POST TYPE: post
    AMP PAGE: NO
    URL: /this-is-some-awesome-test-post-for-advertising-functionality/
    IP ADDRESS: 127.0.0.1
    COUNTRY: 10
    GLOBAL TRACKING: ENABLED
    INTERNAL TRACKING: ENABLED
    EXTERNAL TRACKING: ENABLED
    EXTERNAL TRACKING CAT: Ad Inserter Pro
    EXTERNAL TRACKING ACTION:[EVENT]
    EXTERNAL TRACKING LABEL: [BLOCK_NUMBER] – [BLOCK_VERSION_NAME]
    TRACK PAGEVIEWS: DISABLED
    TRACK LOGGED IN UESRS: ENABLED
    CLICK DETECTION: Standard
    CLICK FRAUD PROTECTION: DISABLED
    GLOBAL VISITOR CFP: DISABLED
    CFP BLOCK IP ADDRESS: DISABLED
    IP GEOLOCATION DATABASE: Internal
    AUTOMATIC DB UPDATES: DISABLED
    MAXMIND LICENSE KEY: 0 characters
    VIEWPORT 1: Desktop min width 980 px
    VIEWPORT 2: Tablet min width 768 px
    VIEWPORT 3: Phone min width 0 px
    SERVER-SIDE DETECTION: NOT USED
    CLIENT-SIDE DETECTION: USED
    DISABLE CACHING: NOT USED
    STICKY WIDGETS: NOT USED
    STICK TO THE CONTENT: NOT USED
    TRACKING: NOT USED
    CLOSE BUTTONS: NOT USED
    IFRAMES: NOT USED
    ANIMATION: NOT USED
    LAZY LOADING: USED
    GEOLOCATION: NOT USED
    CHECK FUNCTIONS: NOT USED
    IFRAMES: NOT USED
    CODE FOR IFRAME: NOT USED
    BLOCK CLASS NAME: code-block
    INLINE STYLES: ENABLED
    DYNAMIC BLOCKS: Client-side insert
    STICKY WIDGET MODE: CSS
    PARAGRAPH COUNTING: Standard
    NO PAR. COUNTING INSIDE: blockquote, figure, li
    OUTPUT BUFFERING: Disabled
    AD LABEL: Advertisement
    MAIN CONTENT:
    PLUGIN PRIORITY: 99999
    TAB SETUP DELAY: 100
    ADMIN DISABLE CACHING: ENABLED
    WAIT FOR JQUERY: ENABLED
    DO NOT CACHE CONSTANTS: DONOTCACHEPAGE DONOTCACHEOBJECT DONOTCACHEDB
    VIRTUAL ADS.TXT: NOT USED
    HEADER: DISABLED
    FOOTER: DISABLED
    AD BLOCKING DETECTION: DISABLED
    DISABLED BY SHORTCODE: NO
    USER AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36
    LANGUAGE: en-US,en;q=0.9

    BLOCK SETTINGS Po Pa Hp Cp Ap Sp AM Aj Fe 404 Wi Sh PHP
    1 Block 1 o . . . . . . o . . x . . [After HTML element][Center][show_label: 1][manual_loading: 1][html_selector: .ad_insert p][paragraph_number: ][skip_last_paragraphs: 1][excerpt_number: %4][adb-block-replacement: 1][taxonomy_list: user-role:da_subscriber][detect_client_side: 1][detect_viewport_1: 1][detect_viewport_2: 1][detect_viewport_3: 1]
    2 Adsense Block o . . . . . . o . . . x x [Disabled][Default][show_label: 1][manual_loading: 1][url_parameter_list: tcf-v2[vendor][consents][755]=true && tcf-v2[purpose][consents][1]=true, tcf-v2[gdprApplies]=false][url_parameter_list_type: 1]

    TOTAL BLOCKS
    FOOTER HOOK: 1

    BLOCKS FOR THIS PAGE TYPE
    FOOTER HOOK 1

    DISABLED BLOCKS:

    TIME EVENT
    ======================================
    0 INITIALIZATION START
    53 AFTER REQUIRE: 53.24 ms
    0 LOAD SETTINGS START
    0 LOAD OPTIONS START
    0 LOAD OPTIONS END
    2 LOAD SETTINGS END
    0 AFTER LOAD SETTINGS: 56.01 ms
    45 AFTER LOAD GLOBALS: 101.48 ms
    9 INITIALIZATION END: 110.65 ms

    1554 FILE NOT FOUND: F:\ProgramFiles\laragon\www\domain/wp-content/languages/plugins/ad-inserter-en_US.mo
    0 FILE NOT FOUND: F:\ProgramFiles\laragon\www\domain/wp-content/plugins/ad-inserter-pro/languages/ad-inserter-en_US.mo
    0 PLUGINS LOADED START
    0 PLUGINS LOADED END: 0.01 ms

    0 PLUGINS LOADED INSTALL DST START
    3 PLUGINS LOADED INSTALL DST END: 3.99 ms

    1998 INIT HOOK START
    1 INIT HOOK END: 1.72 ms

    0 FILE NOT FOUND: F:\ProgramFiles\laragon\www\domain\wp-content\plugins\ad-inserter-pro\includes\update-checker\languages/plugin-update-checker-en_US.mo
    309 FILE NOT FOUND: F:\ProgramFiles\laragon\www\domain\wp-content\plugins\ad-inserter-pro\includes\dst\languages/dst-en_US.mo
    105 WP LOADED HOOK START
    0 WP LOADED HOOK END: 0.00 ms

    1132 WP HOOK START
    0 WP HOOK END: 0.10 ms

    749 HEAD HOOK START
    0 HEAD HOOK END: 0.57 ms

    32 BEFORE POST HOOK START
    0 BEFORE POST HOOK END: 0.04 ms

    188 CONTENT HOOK START [1, IN THE LOOP]
    0 CONTENT HOOK END: 0.77 ms

    569 FOOTER HOOK START
    0 BLOCK 1 FAILED CHECK: FILTER %4
    0 FOOTER HOOK END: 0.23 ms

    0 FOOTER HOOK TO END BUFFERING START
    0 FOOTER HOOK TO END BUFFERING END: 0.00 ms

    325 FOOTER HOOK START

    INSERTION SUMMARY
    ======================================
    BLOCK 1 FAILED CHECK: FILTER %4

    SERVER_ADDR: 127.0.0.1
    HTTP_CF_CONNECTING_IP:
    HTTP_CLIENT_IP:
    HTTP_INCAP_CLIENT_IP:
    HTTP_X_FORWARDED_FOR:
    HTTP_X_FORWARDED:
    HTTP_X_CLUSTER_CLIENT_IP:
    HTTP_FORWARDED_FOR:
    HTTP_FORWARDED:
    REMOTE_ADDR: 127.0.0.1

    PHP PROCESSING DISABLED: NO
    DISALLOW_FILE_EDIT: NO
    DISALLOW_FILE_MODS: NO
    DISALLOW_UNFILTERED_HTML:NO

    MULTISITE: NO
    OPTIONS DATABASE TABLE: wp_options
    site_url: https://domain.local
    home_url: https://domain.local
    ABSPATH: F:\ProgramFiles\laragon\www\domain/
    WP_CONTENT_DIR: F:\ProgramFiles\laragon\www\domain/wp-content

    PHP: 7.4.19
    mbstring: LOADED
    Default charset: UTF-8
    Memory Limit: 512M
    Upload Max Filesize: 2G
    Post Max Size: 2G
    Max Execution Time: 72000
    Max Input Vars: 1000
    Display Errors: 0
    cURL: ENABLED
    fsockopen: ENABLED
    DOMDocument: YES

    Wordpress: 5.9.2
    Current Theme: Hello Elementor Child 1.0.1`

    Plugin Author Spacetime

    (@spacetime)

    Content insertion (at HTML element) has nothign to do with dynamic blocks – client-side cookie checks and insertion.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Ad Inserter w/ ACF & Elementor’ is closed to new replies.