Plugin Author
Paolo
(@paoltaia)
hi,
we have a way to add it via badge and require a click to view the number but there is no real scraping prevention there either.
I asked to the developers to follow up with you to see if we can find a permanent solution.
Thanks,
Plugin Author
Stiofan
(@stiofansisland)
Hi @senextech,
With the “GD > Post Badge” you can setup click (or hover) to reveal any field.
The click to reveal feature should trick most basic scrapers as the info is stored in data attributes.
We have no obfustication except with the email field by default, but I will look into adding this for phone numbers also.
A block example would look like this (you can copy past it)
<!-- wp:geodirectory/geodir-widget-post-badge {"key":"phone","condition":"is_not_empty","badge":"Phone (click to show)","link":"%%input%%","popover_text":"%%phone%%","content":"\u003cspan class=\u0022bsui gd-badge-meta\u0022\u003e\u003cbutton type=\u0022button\u0022 class=\u0022 gd-badge border-0 badge\u0022 data-id=\u00221329\u0022 data-badge=\u0022\u0022 data-badge-condition=\u0022is_not_empty\u0022 data-toggle=\u0022popover-html\u0022 data-placement=\u0022top\u0022 data-content=\u0022%%phone%%\u0022 onclick=\u0022 if(typeof ga == 'function' \u0026\u0026 !jQuery(this).hasClass('gd-event-tracked')) { ga('send', 'event', {eventCategory: 'CTA',eventAction: '',transport: 'beacon' });jQuery(this).addClass('gd-event-tracked');} \u0022 style=\u0022background-color:#0073aa;border-color:#0073aa;color:#ffffff;\u0022 \u003ePhone (click to show)\u003c/button\u003e\n\u003c/span\u003e"} -->
[gd_post_badge id='' key='phone' condition='is_not_empty' search='' icon_class='' badge='Phone (click to show)' link='%%input%%' new_window='false' popover_title='' popover_text='%%phone%%' cta='' tooltip_text='' hover_content='' hover_icon='' type='' shadow='' color='' bg_color='#0073aa' txt_color='#ffffff' size='' alignment='' position='' mt='' mr='' mb='' ml='' list_hide='' list_hide_secondary='' css_class='' ]
<!-- /wp:geodirectory/geodir-widget-post-badge -->
A shortcode example:
[gd_post_badge id='' key='phone' condition='is_not_empty' search='' icon_class='' badge='Phone (click to show)' link='%%input%%' new_window='false' popover_title='' popover_text='%%phone%%' cta='' tooltip_text='' hover_content='' hover_icon='' type='' shadow='' color='' bg_color='#0073aa' txt_color='#ffffff' size='' alignment='' position='' mt='' mr='' mb='' ml='' list_hide='' list_hide_secondary='' css_class='' ]
If I can help further please let me know.