WordPress File URL Path Incorrect

Because you only have one slash instead of two in your URL: http:/eatdrink.ca That double slash ain’t just for looks. 🙂 Go to the hidden options.php page located at /wp-admin/options.php. Check and see what the “upload_url_path” is set to. Make sure it has a double slash there (if it’s empty, that is acceptable as well, … Read more

How to make WordPress urls matching static html urls

It looks like every “old” URL is a bit different from each other so you should manually create permanent redirects (HTTP 301) for each URL. I recommend using either Redirects (very simple and intuitive) or Safe Redirect Manager (more advanced features) plugins.

Creating customized php files in theme folder

Problem#1: You can create a customized php file for your page using a Page Template Page Templates WordPress looks for template files in the following order: Page Template — If the page has a custom template assigned, WordPress looks for that file and, if found, uses it. page-{slug}.php — If no custom template has been … Read more

how to load posts to a custom post template after using template_redirect or template_include

here is the full code to force change theme by a reserved wordpress parameter add_action( ‘pre_get_posts’, ‘my_pre_get_posts’ ); function my_pre_get_posts($wp_query) { global $wpdb; // Confirm request is main query if(!$wp_query->is_main_query()) { return; } // Get post name from query $post_name = $wp_query->get(‘pagename’); // Get post type from database $post_type = $wpdb->get_var( $wpdb->prepare( ‘SELECT post_type FROM … Read more

Call featured image url

the_post_thumbnail() is highest level function for it, which will output complete HTML. If you need some lower level parts, digging deeper are nested: get_the_post_thumbnail() wp_get_attachment_image() wp_get_attachment_image_src()