Wordpress Permalink Hack

I don't know much about Wordpress internal working and only know a little and does a little PHP programming. (I don't like PHP, Python suits me better!)

What I want to achieve is to show my Sky Explorer user guide posts with a different template. When I type a number behind the permalink url, I notice it actually display the same permalink post without the number. (Somehow, the number is being consumed) After a bit of debugging, I find out this is captured in $wp_query->query_vars["page"] , so I made a hack to select a different template by also using this value by replacing the get_single_template function in theme.php .

Seems to be working OK! Browse Sky Explorer User Guide.

Comments

blog comments powered by Disqus