Why is it I cant set a get variable
I am appending ?readmore=true to the end of a url in wordpress
<a href="<?php the_permalink(); ?>?readmore=true" class="readmore">
<span><?php _e('Read more','MyProduct'); ?></span>
</a>
but on the next page I tried this
<?php
print_r($_GET);
if($_GET['readmore'] == 开发者_JAVA技巧"true") {
get_header();
}
?>
and in my print_r
I get this
Array ( [page_id] => 8?readmore=true )
Am I missing something about get variables in wordpress
Try to append &readmore=true instead of ?readmore=true.
精彩评论