Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter matthewstringer

    (@matthewstringer)

    Thank you, Milind. I am beginning to think this is just some small lack of patience on our part as we are seeing our older posts’ AMP pages rank normally, so maybe it’s just impacting the most recent stuff. I’ll also post the matter in Search Central Support.

    Thank you again! Great plugin!

    Thread Starter matthewstringer

    (@matthewstringer)

    Hi all, yes, the change worked actually rather quickly. So, to summarize, I used the exclusion code snippet you guys provided elsewhere in my functions.php file, like so:

    function jetpackme_filter_exclude_category( $filters ) {
        $filters[] = array(
            'not' => array(
                'terms' => array(
                    'category.slug' => array(
                        'category1',
                        'category2',
    	            'category3',
    		    'uncategorized'
                    ),
                ),
            ),
        );
        return $filters;
    }
    add_filter( 'jetpack_relatedposts_filter_filters', 'jetpackme_filter_exclude_category' );

    By way of background, categories 1-3 are the ones I wanted to exclude. Then, the category of those unique, dozen or so posts, let’s call it category 4, was not excluded and thus it became the only batch of posts to pull related posts from. I just had to make sure it did not share a category with any of the others.

    Speaking verbosely to help future web denizens who wind up here. Thanks again!

    Thread Starter matthewstringer

    (@matthewstringer)

    Only about an hour ago. Because of the nature of the site, I am reverting to showing more categories and will attempt to resolve with the new category when traffic dies down overnight. I will follow up! Thanks again.

    Thread Starter matthewstringer

    (@matthewstringer)

    Thanks, James. I figured out how to exclude multiple categories, and was able to move the posts needed for related posts in to a separate category. However, none of those posts are appearing now. There are only about a dozen if that matters. I tried to force-reindex the site in wordpress.com, but they still won’t show. Does it just take time or are there not enough posts to pull from? Thanks in advance!

    matthewstringer

    (@matthewstringer)

    Hey all, what ended up working for us was the following. It’s included as the first function in our functions.php file immediately below the <?php:

    function country_geo_redirect() {
      $geo = WPEngine\GeoIp::instance();
        if ( 'UK' === $geo->country() ) {
    		wp_redirect( 'https://example.com', 301 );
    		exit;
        } 
      }
    add_action('init', 'country_geo_redirect');

    Note that BEFORE you even add this to your functions.php, you will want to make sure the GeoIp plugin is installed, activated, and that *at least* the country cache bucket is enabled by the fine folks at WPEngine. Of course, you could probably easily rewrite the function to check for the instance, first, but this was a simple, working approach for now.

    And, of course, UK is just one possible country code. I found a list of country codes here: https://jpgamboa.com/country-codes-for-wp-engine-geoip/

    matthewstringer

    (@matthewstringer)

    Thanks, Rhys, I hadn’t thought of that but makes perfect sense. Cheers!

    matthewstringer

    (@matthewstringer)

    Is there a way to spoof to check the redirect is working? I’ve tried adding the /?geoip&region=FR to the end of the URL in my browser bar but it doesn’t seem to work. Thanks much!

    Have you tried utilizing the custom CSS feature? You could investigate each ID to see which ones are not behaving the way you like (using Chrome or Firefox, for example) and then change them in the custom CSS field back on Intense Debate. That sort of thing has worked for me when, for example, the span containing the Facebook Connect button was obfuscating the OpenID button.

    Oh, and for any change in the custom CSS you add, be sure to flag them as !important (e.g., and this is just an example, don’t know if it would apply to your case: `#idc-container-parent #idc-container .idc-foot {
    display: none <strong>!important</strong>;
    }`

    Good luck! Play around with it and don’t give up!

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