Title: Eric De Kock's Replies | WordPress.org

---

# Eric De Kock

  [  ](https://wordpress.org/support/users/ericdk/)

 *   [Profile](https://wordpress.org/support/users/ericdk/)
 *   [Topics Started](https://wordpress.org/support/users/ericdk/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ericdk/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ericdk/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ericdk/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ericdk/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ericdk/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Elementor Website Builder - more than just a page builder] Hide section elements based on GEO Content](https://wordpress.org/support/topic/hide-section-elements-based-on-geo-content/)
 *  Thread Starter [Eric De Kock](https://wordpress.org/support/users/ericdk/)
 * (@ericdk)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/hide-section-elements-based-on-geo-content/#post-10118220)
 * Just to give you an idea what I have done thus far.
 * Below is the control I have created which will add the class show-‘state’ to 
   the section.
 * In the section action you will notice that I’m checking each section’s setting
   and comparing the setting with the current active user state.
 * My last step would be to print the element if the user state and the section 
   state are equel. How would I print only that element.
 * add_action( ‘elementor/element/before_section_start’, function( $element, $section_id,
   $args ) {
    /** [@var](https://wordpress.org/support/users/var/) \Elementor\Element_Base
   $element */ if ( ‘section’ === $element->get_name() && ‘section_background’ =
   == $section_id ) {
 *  $element->start_controls_section(
    ‘states’, [ ‘tab’ => \Elementor\Controls_Manager::
   TAB_STYLE, ‘label’ => __( ‘States’, ‘state-select’ ), ] );
 *  $element->add_control(
    ‘custom_control’, [ ‘type’ => \Elementor\Controls_Manager::
   SELECT, ‘label’ => __( ‘Choose your state’, ‘state-select’ ), ‘default’ => ‘sa’,‘
   options’ => array( ‘all’ => ‘ALL’, ‘sa’ => ‘SA’, ‘wa’ => ‘WA’, ‘nsw’ => ‘NSW’,‘
   vic’ => ‘VIC’, ‘qld’ => ‘QLD’, ‘act’ => ‘ACT’ ), ‘prefix_class’ => ‘show-‘, ‘
   label_block’ => true, ] ); $element->end_controls_section(); } }, 10, 3 );
 * add_action( ‘elementor/frontend/element/before_render’, function ( \Elementor\
   Element_Base $element ) {
    if ( ‘section’ === $element->get_name() ) { //$geoip2_state
   = strtolower( get_geoip2_country_state( get_visitor_IP() ) ); $activestate = 
   $element->get_settings( ‘custom_control’ );
 *  if ( $activestate == $_COOKIE[‘userState’] ):
    echo ‘eq: ‘ . $activestate; //
   $element->print_element();
 *  else:
    //$element->print_element(); echo ‘not eq: ‘ . $activestate; endif; }});
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordpress Picture / Portfolio / Media Gallery] Filter navigation disappeared](https://wordpress.org/support/topic/filter-navigation-disappeared/)
 *  Thread Starter [Eric De Kock](https://wordpress.org/support/users/ericdk/)
 * (@ericdk)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/filter-navigation-disappeared/#post-4251032)
 * Sure thing, I have added you and I have sent you an email with the login details.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordpress Picture / Portfolio / Media Gallery] Filter navigation disappeared](https://wordpress.org/support/topic/filter-navigation-disappeared/)
 *  Thread Starter [Eric De Kock](https://wordpress.org/support/users/ericdk/)
 * (@ericdk)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/filter-navigation-disappeared/#post-4250973)
 * Here you go
    [http://www.ameliasmit.co.za/portfolio/](http://www.ameliasmit.co.za/portfolio/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Connect Matomo - Analytics Dashboard for WordPress] [Plugin: WP-Piwik] Multisite error: On subdomains](https://wordpress.org/support/topic/plugin-wp-piwik-multisite-error-on-subdomains/)
 *  Thread Starter [Eric De Kock](https://wordpress.org/support/users/ericdk/)
 * (@ericdk)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-piwik-multisite-error-on-subdomains/#post-2685430)
 * The last 2 sentences was actually referring to an additional plugin for piwik,
   to show stats in the front-end. Sorry my bad.
 * So if I understand you correctly, I should manually ad site to piwik, but rather
   that wp-piwik do it for me.

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