How to achieve anchor links on top of pages.

If you’re trying to do this just for anchor links within your current WP page, a table of contents style plugin will likely suffice; for example, see: http://wordpress.org/plugins/table-of-contents-plus/ This specific example auto-generates the table of contents and anchors based on the headers in your document/page, so it is fairly low fuss on you as the … Read more

Hide if subpages are shown

Doesn’t seem like you are using an if-statement for showing the sub-pages? If you are not, I guess you can do it with jQuery. var sub = $(“div.subpages”); if (sub.length > 0) { $(“#secondary”).hide(); // replace “secondary” with the ID of the sidebar }