• Resolved silva8899

    (@silva8899)


    Hello There,
    I have a question what is very important. Its possible that i can block only specific pages by country blocking? Not all pages, only few specific pages…
    Thanks for your help

    kind regards

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

    (@tokkonopapa)

    Hi @silva8899,

    Sure you can.

    You can find “Validation target” when you select “Specify the target” on “Front-end target settings“.

    Specify the targets

    So if you want to publish a specific “page” which can be accessed from specific countries, please check that “page”. If you want to publish some specific “post”s, you can give the specific tag or category to those posts and check the tag or category.

    You can find some details in this document about Blocking on front-end.

    Thread Starter silva8899

    (@silva8899)

    Hi, Yes this i saw, but i dont want block all pages, i have to block just 3 pages, actually just three propertys on the website, not all pages. This is the question…sorry for my english

    kind regards

    • This reply was modified 7 years, 9 months ago by silva8899.
    Plugin Author tokkonopapa

    (@tokkonopapa)

    Do you understand how to add the pages in WordPress?

    Please look at the image that I previous posted. In the list of “Page”, you can find the followings:

    1. Activate
    2. Forums
    3. Members
    4. Register
    5. Sample Page

    Each of them is the title of the page and is individual.

    WordPress Pages

    So if you check 1, 2 and 3, the following pages would be “Blocked by country”:

    1. https://example.com/activate/
    2. https://example.com/forums/
    3. https://example.com/members/

    Does it make sense for you?

    • This reply was modified 7 years, 9 months ago by tokkonopapa.
    Thread Starter silva8899

    (@silva8899)

    No this help not really…this part “property” is self a part of the template, actually is not a page. in the first screenshot you can see all propertys, but from them i have to block just few not all. In the 2. screenshot you can see the plugin settings from you. There i can block just all propertys, but i dont need all blocked just few properties…so how i can set this.

    1. Screenshot

    2. Screenshot

    • This reply was modified 7 years, 9 months ago by silva8899.
    • This reply was modified 7 years, 9 months ago by silva8899.
    Thread Starter silva8899

    (@silva8899)

    maybe you have somewhere in the plugin the option that i can block just specific URLs???or something like this?

    kind regards

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Which plugin are you talking about?

    For example https://www.ads-software.com/plugins/wp-property/ ?

    this part “property” is self a part of the template

    Yes, you’re right! But I think the “property” is some kind of extended custom field or something meta data related to the post type by some plugin. And unfortunately I don’t support the specific plugin. And I also think you need some kind of “control contents by country” plugin, not “blocking by country” plugin. The purpose of this plugin is mainly for security, not content controlling.

    If I missed something about WordPress standard feature, please let me know about it.

    Thanks.

    • This reply was modified 7 years, 9 months ago by tokkonopapa.
    Plugin Author tokkonopapa

    (@tokkonopapa)

    maybe you have somewhere in the plugin the option that i can block just specific URLs???or something like this?

    Technically I can, but I think that’s not a smart way because if you want to specify a hundred pages, then a hundred URLs you need.

    But I will consider to provide some custom filter hook to extend the functionality of this plugin in the future.

    • This reply was modified 7 years, 9 months ago by tokkonopapa.
    Plugin Author tokkonopapa

    (@tokkonopapa)

    How about this solution for “controlling content by country” using shortcode?

    1. Put the following code snippet into your theme’s functions.php:

    if ( class_exists( 'IP_Geo_Block' ) ) {
        function my_content_control( $args, $content = null ) {
            // get the visitor's geolocation
            $geo = IP_Geo_Block::get_geolocation();
    
            // return content if the contry code matches the white list
            $settings = IP_Geo_Block::get_option();
            if ( FALSE !== stripos( $settings['public']['white_list'], $geo['code'] ) ) {
                return $content;
            }
    
            // return a default message
            return "<p>Sorry, but you can't access this content.</p>\n";
        }
    
        add_shortcode( 'ip-geo-block', 'my_content_control' );
    }

    2. Set “Whitelist of country code” for “Front-end target settings” but disable “Block by country” as follows:

    Front-end settings

    3. The put the shortcode [ip-geo-block] into your target page as follows:

    [ip-geo-block]
    <p>This is a content restricted by country.</p>
    [/ip-geo-block]

    I think this solution is better than specifying the URLs because WordPress can parse some multiple URLs as the same page.

    Hopefully this can help you.

    Plugin Author tokkonopapa

    (@tokkonopapa)

    Dear @silva8899 and all,

    I wrote an article “Shortcode for Geo Filtering” to solve this issue. Please refer to it.

    Thank you for raising this topic!

    • This reply was modified 7 years, 9 months ago by tokkonopapa.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘I need help because of the settings’ is closed to new replies.