I have a WordPress blog, but I am also hosting a standalone static HTML page on the same domain/server (LaughingSquid, if it makes a difference). I'm very new to WordPress and PHP, so I am wondering if there is a relatively simple way to use PHP to add the topbar that appears in my WordPress-based pages to the static HTML page. Is this possible and how would you go about doing it? Thanks.
You must require the WordPress Blog Header as per the Codex.
<?php require('/the/path/to/your/wp-blog-header.php'); ?>
Paste this at the top of your standalone page and then try querying your WPDB.
You can create a custom page template file for your theme which consists of your HTML page markup. You will need to include your topbar, hopefully it is in your header.php template file in which case you can use
<?php get_header(); ?> to include it. Then when you add your page you will be able to select this custom template. There is no other easy way of doing this.
Take a look at the WordPress codex.
Your custom page will look like this:
You will also need to enqueue the stylesheet in your theme's functions.php file.
wp_enqueue_style( 'carto-theme', 'http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css' ); ?>
You can add a page directly from the wordpress admin. This page will have the same layout of the rest of your blog.
If you need more info, you can check here.
Hope it helps.