I am making a plugin to hide the canonical element from the header on comment pages.

My complete plugin code is:

```
global $cpage; 
if($cpage > 1){
remove_action('wp_head', 'rel_canonical');
}

```

So if the comment page number is > 1 then it will remove the canonical.

If I have just the `remove_action('wp_head', 'rel_canonical');` without the IF then it works...but I am trying to use the variable $cpage (which gives the comment page number in wordpress) to remove only on the comment pages...

What am I doing wrong here?