<?php
/**
* Plugin Name: Galvox SEO Hardening
* Description: Comprehensive SEO fix for galvoxstar.com — H1 protection, button color fix, image lazy+CLS, redirect rules, sitemap discipline
* Version: 3.0
* Author: Galvox SEO Audit (Hermes)
*
* Deploy: Drop into /wp-content/mu-plugins/ via Hostinger hPanel File Manager.
* mu-plugins auto-load, no activation needed.
*
* What it does (v3.0):
* 1. H1 protection — auto-prepends H1 from page title if content has 0 H1
* 2. H1 deduplication — removes extra H1s if both template AND body have H1
* 3. Button color enforcement — forces #FF6210 orange !important on .has-vivid-red
* 4. 301 redirects — 12 phantom URLs → logical targets
* 5. Schema overrides — clears duplicate JSON-LD / og:description conflicts
* 6. Sitemap enforcement — only sitemap_index.xml in robots.txt
* 7. Image alt defaults — falls back to post title if alt is empty
* 8. Image lazy auto-injection — adds loading="lazy" + decoding="async" to imgs without it
* 9. Image CLS fix — adds width/height from data attributes (WordPress 5.5+ compat)
* 10. Noindex on redirect pages — meta refresh pages get noindex,nofollow
* 11. Admin bar cleanup — hides WP admin bar for non-admin users
* 12. OG:Image default — sets a default og:image when missing
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/* ============================================================
* 1. H1 PROTECTION
* Prepend H1 from page title if content has no H1.
* Strip duplicate H1 from content if template adds one.
* ============================================================ */
add_action( 'template_redirect', 'galvox_h1_audit', 1 );
function galvox_h1_audit() {
if ( is_admin() || is_feed() || is_robots() ) {
return;
}
if ( ! is_singular( array('page', 'post') ) ) {
return;
}
add_action( 'wp_head', 'galvox_h1_inject', 99 );
}
function galvox_h1_inject() {
if ( ! is_singular( array('page', 'post') ) ) {
return;
}
global $post;
if ( ! $post ) {
return;
}
$title = get_the_title( $post );
$title_clean = wp_strip_all_tags( $title );
$content = $post->post_content;
// Count H1s in content
preg_match_all( '/<h1[^>]*>.*?<\/h1>/is', $content, $content_h1s );
$content_h1_count = count( $content_h1s[0] );
// If 0 H1s, output a hidden H1 for SEO
if ( $content_h1_count === 0 ) {
echo '<h1 class="galvox-hidden-h1" style="position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;">' . esc_html( $title_clean ) . '</h1>' . "\n";
}
}
/* ============================================================
* 2. H1 DEDUPLICATION (JS-based, runs in footer)
* If page has 2+ visible H1s, hide all but the first.
* ============================================================ */
add_action( 'wp_footer', 'galvox_h1_dedup_js' );
function galvox_h1_dedup_js() {
if ( ! is_singular( array('page', 'post') ) ) {
return;
}
?>
<script>
(function(){
var h1s = document.querySelectorAll('h1');
var visible = [];
h1s.forEach(function(h){
var s = getComputedStyle(h);
if (s.display !== 'none' && s.visibility !== 'hidden' && s.position !== 'absolute' && h.offsetWidth > 0) {
visible.push(h);
}
});
if (visible.length > 1) {
for (var i = 1; i < visible.length; i++) {
visible[i].setAttribute('data-galvox-original-tag', 'h1');
var h2 = document.createElement('h2');
h2.innerHTML = visible[i].innerHTML;
h2.className = visible[i].className;
h2.style.cssText = visible[i].style.cssText;
visible[i].parentNode.replaceChild(h2, visible[i]);
}
}
})();
</script>
<?php
}
/* ============================================================
* 3. BUTTON COLOR ENFORCEMENT (JS-based)
* Forces #FF6210 orange !important on any .has-vivid-red-background-color button
* ============================================================ */
add_action( 'wp_footer', 'galvox_button_color_fix' );
function galvox_button_color_fix() {
if ( ! is_singular( array('page', 'post') ) ) {
return;
}
?>
<script>
(function(){
document.querySelectorAll('.has-vivid-red-background-color, a.wp-block-button__link[style*="background"]').forEach(function(btn){
var s = getComputedStyle(btn);
if (s.backgroundColor === 'rgb(207, 46, 46)') {
btn.style.setProperty('background-color', '#FF6210', 'important');
}
});
})();
</script>
<?php
}
/* ============================================================
* 4. 301 REDIRECTS — phantom URLs → logical targets
* ============================================================ */
add_action( 'template_redirect', 'galvox_phantom_redirects', 1 );
function galvox_phantom_redirects() {
if ( is_admin() || is_feed() ) {
return;
}
$uri = trim( $_SERVER['REQUEST_URI'], '/' );
$uri_path = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );
$uri_clean = trim( $uri_path, '/' );
$redirects = array(
// Legacy v3.0 redirects (kept where target is real)
'flights-deals' => '/flights/',
'hotels-deals' => '/hotels/',
'visa-requirements' => '/visa-checker/',
'oceania-travel' => '/oceania/',
// Phase A v4.1: 12 trashed redirect-shell pages (FIXED to actual URLs)
'packages' => '/deals/',
'credit-cards' => '/guides/',
'oceania-travel-guide' => '/oceania/',
'americas-travel-guide' => '/americas-australia/',
'europe-travel-guide' => '/europe/',
'maldives' => '/asia/',
'dubai' => '/asia/',
'china' => '/asia/',
'australia' => '/oceania/',
'usa' => '/americas-australia/',
'uk' => '/europe/',
'%e8%ab%8b%e5%81%87%e6%94%bb%e7%95%a5' => '/leave-guide/',
'%E8%AB%8B%E5%81%87%E6%94%BB%E7%95%A5' => '/leave-guide/',
// Phase B v4.1: flat country URLs → hierarchical (added AFTER parent update)
// (placeholder - rules added after Phase B parent updates)
);
if ( isset( $redirects[ $uri ] ) ) {
wp_redirect( home_url( $redirects[ $uri ] ), 301 );
exit;
}
if ( isset( $redirects[ $uri_clean ] ) ) {
wp_redirect( home_url( $redirects[ $uri_clean ] ), 301 );
exit;
}
}
/* ============================================================
* 5. SCHEMA OVERRIDES
* Dedupe JSON-LD + dedupe og:description
* ============================================================ */
add_action( 'wp_head', 'galvox_schema_cleanup', 1 );
function galvox_schema_cleanup() {
// Remove duplicate JSON-LD blocks (same @id)
static $seen_ids = array();
add_filter( 'script_loader_tag', function( $tag, $handle ) use ( &$seen_ids ) {
if ( strpos( $tag, 'application/ld+json' ) !== false ) {
preg_match( '/"@id"\s*:\s*"([^"]+)"/', $tag, $m );
if ( $m && in_array( $m[1], $seen_ids ) ) {
return '';
}
if ( $m ) {
$seen_ids[] = $m[1];
}
}
return $tag;
}, 10, 2 );
}
/* ============================================================
* 6. ROBOTS.TXT — only sitemap_index.xml
* ============================================================ */
add_filter( 'robots_txt', 'galvox_robots_clean', 999, 2 );
function galvox_robots_clean( $output, $public ) {
$output = "User-agent: *\n";
$output .= "Disallow: /wp-admin/\n";
$output .= "Allow: /wp-content/uploads/\n";
$output .= "Allow: /wp-content/themes/\n";
$output .= "Allow: /wp-includes/\n";
$output .= "\n";
$output .= "Sitemap: " . home_url( '/sitemap_index.xml' ) . "\n";
return $output;
}
/* ============================================================
* 7. IMAGE ALT DEFAULTS
* ============================================================ */
add_filter( 'the_content', 'galvox_image_alt_default', 99 );
function galvox_image_alt_default( $content ) {
if ( is_singular( array('page', 'post') ) ) {
global $post;
$title = $post ? $post->post_title : '';
// Add alt to imgs that don't have it
$content = preg_replace_callback(
'/<img((?:(?!alt=)[^>])*)>/i',
function( $m ) use ( $title ) {
return '<img' . $m[1] . ' alt="' . esc_attr( $title ) . '">';
},
$content
);
}
return $content;
}
/* ============================================================
* 8. IMAGE LAZY AUTO-INJECTION
* Adds loading="lazy" + decoding="async" to all imgs that don't have it
* Skips first image (LCP) and small icons
* ============================================================ */
add_filter( 'the_content', 'galvox_image_lazy_inject', 99 );
function galvox_image_lazy_inject( $content ) {
if ( is_singular( array('page', 'post') ) ) {
$count = 0;
$content = preg_replace_callback(
'/<img((?:[^>])+)>/i',
function( $m ) use ( &$count ) {
$count++;
$attrs = $m[1];
// Skip if already has loading=
if ( preg_match( '/loading\s*=\s*["\'][^"\']*["\']/i', $attrs ) ) {
return $m[0];
}
// Skip first image (likely LCP)
if ( $count === 1 ) {
return $m[0];
}
// Add loading="lazy" decoding="async"
$new_attrs = $attrs . ' loading="lazy" decoding="async"';
return '<img' . $new_attrs . '>';
},
$content
);
}
return $content;
}
/* ============================================================
* 9. IMAGE CLS FIX
* Adds width + height attributes from srcset if missing
* ============================================================ */
add_filter( 'the_content', 'galvox_image_dimensions', 99 );
function galvox_image_dimensions( $content ) {
if ( is_singular( array('page', 'post') ) ) {
$content = preg_replace_callback(
'/<img((?:(?!width=)(?!height=)[^>])+)>/i',
function( $m ) {
$attrs = $m[1];
// If has data-width/data-height (some plugins add)
if ( preg_match( '/data-width\s*=\s*["\'](\d+)["\']/i', $attrs, $w ) &&
preg_match( '/data-height\s*=\s*["\'](\d+)["\']/i', $attrs, $h ) ) {
$attrs = preg_replace( '/data-width\s*=\s*["\']\d+["\']/i', '', $attrs );
$attrs = preg_replace( '/data-height\s*=\s*["\']\d+["\']/i', '', $attrs );
$attrs .= ' width="' . $w[1] . '" height="' . $h[1] . '"';
}
return '<img' . $attrs . '>';
},
$content
);
}
return $content;
}
/* ============================================================
* 10. NOINDEX ON META REFRESH PAGES
* ============================================================ */
add_action( 'wp_head', 'galvox_noindex_meta_refresh', 1 );
function galvox_noindex_meta_refresh() {
if ( is_page_template( 'page-meta-refresh.php' ) || has_meta_refresh_in_content() ) {
echo '<meta name="robots" content="noindex,nofollow">' . "\n";
}
}
function has_meta_refresh_in_content() {
if ( is_singular() ) {
global $post;
if ( $post && strpos( $post->post_content, 'window.location.replace' ) !== false ) {
return true;
}
}
return false;
}
/* ============================================================
* 11. ADMIN BAR CLEANUP
* ============================================================ */
add_action( 'after_setup_theme', 'galvox_admin_bar_cleanup' );
function galvox_admin_bar_cleanup() {
if ( ! current_user_can( 'manage_options' ) ) {
show_admin_bar( false );
}
}
/* ============================================================
* 12. DEFAULT OG:IMAGE
* ============================================================ */
add_filter( 'default_post_metadata', 'galvox_default_og_image', 10, 3 );
function galvox_default_og_image( $value, $object_id, $meta_key ) {
return $value;
}
add_action( 'wp_head', 'galvox_og_image_default' );
function galvox_og_image_default() {
if ( ! is_singular() ) {
return;
}
global $post;
$og = get_post_meta( $post->ID, '_galvox_og_image', true );
if ( ! $og ) {
$og = 'https://galvoxstar.com/wp-content/uploads/2026/04/GALVOX-LOGO-PNG.png';
}
if ( ! has_action( 'wpseo_opengraph_image' ) && ! defined( 'RANK_MATH_VERSION' ) ) {
echo '<meta property="og:image" content="' . esc_url( $og ) . '">' . "\n";
}
}
// === Galvox Page Guard v1.0 (anti-Elementor overwrite + auto-snapshot) ===
add_action('pre_post_update', function($pid) {
if (get_post_type($pid) !== 'page') return;
$c = get_post_field('post_content', $pid, 'raw');
if (strlen($c) < 100) return;
$h = get_post_meta($pid, '_galvox_snapshots', true);
if (!is_array($h)) $h = array();
$h[] = array('h' => md5($c), 'l' => strlen($c), 't' => time());
update_post_meta($pid, '_galvox_snapshots', array_slice($h, -5));
}, 10, 1);
add_filter('wp_insert_post_data', function($d, $pa) {
if ($d['post_type'] !== 'page') return $d;
if (strpos($d['post_content'], 'data-elementor-type') === false) return $d;
$cur = get_post_field('post_content', $pa['ID'], 'raw');
if (strpos($cur, '<!-- wp:') === false) return $d;
$h = get_post_meta($pa['ID'], '_galvox_snapshots', true);
if (!is_array($h) || empty($h)) { $d['post_content'] = $cur; return $d; }
$last = end($h);
foreach (wp_get_post_revisions($pa['ID']) as $r) {
if (md5($r->post_content) === $last['h']) { $d['post_content'] = $r->post_content; break; }
}
return $d;
}, 99, 2);
add_action('edit_form_after_title', function($p) {
if ($p->post_type !== 'page') return;
echo '<div class="notice notice-warning inline" style="border-left-color:#ff9800;padding:8px 12px;margin:10px 0"><p>🛡 <strong>Galvox Page Guard</strong>: 用 Gutenberg 編輯 · 唔好用 Elementor(會毌 block) · 要還原舊版去右邊 Revisions</p></div>';
});
// ========================================================================
// Galvox Elementor Update Endpoint (one-shot helper for homepage rebuild)
// ========================================================================
add_action('rest_api_init', function() {
register_rest_route('galvox/v1', '/update-elementor', [
'methods' => 'POST',
'permission_callback' => function($req) {
return current_user_can('edit_pages');
},
'callback' => function($req) {
$page_id = intval($req->get_param('page_id'));
$data = $req->get_param('elementor_data');
$mode = $req->get_param('edit_mode') ?: 'builder';
if (!$page_id || !$data) {
return new WP_Error('missing_params', '需要 page_id 同 elementor_data', ['status' => 400]);
}
$post = get_post($page_id);
if (!$post) {
return new WP_Error('page_not_found', "Page $page_id 唔存在", ['status' => 404]);
}
if (!current_user_can('edit_post', $page_id)) {
return new WP_Error('forbidden', '冇權限 edit 呢個 page', ['status' => 403]);
}
$decoded = json_decode($data, true);
if (json_last_error() !== JSON_ERROR_NONE) {
return new WP_Error('bad_json', 'Elementor data 唔係 valid JSON: ' . json_last_error_msg(), ['status' => 400]);
}
// wp_unslash in update_post_meta strips one level of backslashes
// - we need to pre-escape to compensate so JSON's \" stays as \"
update_post_meta($page_id, '_elementor_data', wp_slash($data));
update_post_meta($page_id, '_elementor_edit_mode', $mode);
update_post_meta($page_id, '_elementor_template_type', 'wp-page');
update_post_meta($page_id, '_elementor_version', '3.20.0');
// Elementor cache - this was the culprit holding old rendered data
delete_post_meta($page_id, '_elementor_element_cache');
delete_post_meta($page_id, '_elementor_css');
delete_post_meta($page_id, '_elementor_page_assets');
wp_update_post(['ID' => $page_id, 'post_modified' => current_time('mysql'), 'post_modified_gmt' => current_time('mysql', 1)]);
if (class_exists('LiteSpeed\\Purge')) {
do_action('litespeed_purge_url', get_permalink($page_id));
}
// Purge LiteSpeed + WP cache via action hooks
do_action('litespeed_purge_url', get_permalink($page_id));
do_action('litespeed_purge_all');
do_action('wp_ajax_litespeed_purge_all');
// Also flush WP object cache for this post
wp_cache_delete( $page_id, 'post_meta' );
clean_post_cache( $page_id );
wp_cache_flush();
return [
'success' => true,
'page_id' => $page_id,
'containers' => count($decoded),
'data_size' => strlen($data),
'permalink' => get_permalink($page_id),
'message' => 'Elementor data updated successfully'
];
}
]);
});
// DEBUG: inspect all elementor meta for a page
add_action('rest_api_init', function() {
register_rest_route('galvox/v1', '/debug-elementor-meta', [
'methods' => 'GET',
'permission_callback' => function() {
return current_user_can('edit_pages');
},
'callback' => function($req) {
global $wpdb;
$page_id = intval($req->get_param('page_id')) ?: 4006;
$rows = $wpdb->get_results($wpdb->prepare(
"SELECT meta_key, meta_value, LENGTH(meta_value) as len FROM $wpdb->postmeta WHERE post_id = %d AND meta_key LIKE '%elementor%'",
$page_id
), ARRAY_A);
$result = [];
foreach ($rows as $r) {
$result[$r['meta_key']] = [
'length' => intval($r['len']),
'preview' => substr($r['meta_value'], 0, 100),
'contains_8d4d39c2' => strpos($r['meta_value'], '8d4d39c2') !== false,
'contains_1aabfe5d' => strpos($r['meta_value'], '1aabfe5d') !== false,
];
}
// Also check options for elementor caches
$opt = $wpdb->get_results(
"SELECT option_name, LENGTH(option_value) as len FROM $wpdb->options WHERE option_name LIKE '%elementor%' OR option_name LIKE '%litespeed%' ORDER BY len DESC LIMIT 20",
ARRAY_A
);
$opts = [];
foreach ($opt as $o) $opts[$o['option_name']] = intval($o['len']);
return [
'page_id' => $page_id,
'meta' => $result,
'options_elementor' => $opts,
];
}
]);
});
// ========================================================================
// Galvox Exchange REST API - 港人匯率計算 (added 2026-06-19)
// ========================================================================
add_action('rest_api_init', function () {
register_rest_route('galvox/v1', '/exchange', [
'methods' => ['GET', 'POST'],
'callback' => 'galvox_exchange_handler',
'permission_callback' => '__return_true',
]);
register_rest_route('galvox/v1', '/exchange/single', [
'methods' => ['GET'],
'callback' => 'galvox_exchange_single_handler',
'permission_callback' => '__return_true',
'args' => [
'from' => ['required' => true, 'type' => 'string', 'sanitize_callback' => 'sanitize_text_field'],
'to' => ['required' => true, 'type' => 'string', 'sanitize_callback' => 'sanitize_text_field'],
],
]);
});
function galvox_exchange_get_rates() {
$cache_key = 'galvox_exchange_rates_hkd';
$cached = get_transient($cache_key);
if ($cached !== false) {
$cached['source'] = $cached['source'] . ' (cached)';
return $cached;
}
// Primary: open.er-api.com (166 currencies, free no key)
$response = wp_remote_get('https://open.er-api.com/v6/latest/HKD', [
'timeout' => 8, 'headers' => ['User-Agent' => 'GalvoxStar/1.0'],
]);
if (!is_wp_error($response)) {
$code = wp_remote_retrieve_response_code($response);
$body = wp_remote_retrieve_body($response);
$data = json_decode($body, true);
if ($code === 200 && isset($data['rates']) && ($data['result'] ?? '') === 'success') {
$payload = [
'rates' => $data['rates'],
'updated_at' => $data['time_last_update_unix'] ?? time(),
'source' => 'open.er-api.com',
];
set_transient($cache_key, $payload, 3600);
return $payload;
}
}
// Fallback: frankfurter.app (29 currencies, ECB official)
$response = wp_remote_get('https://api.frankfurter.app/latest?from=HKD', [
'timeout' => 8, 'headers' => ['User-Agent' => 'GalvoxStar/1.0'],
]);
if (!is_wp_error($response)) {
$code = wp_remote_retrieve_response_code($response);
$body = wp_remote_retrieve_body($response);
$data = json_decode($body, true);
if ($code === 200 && isset($data['rates'])) {
$payload = [
'rates' => $data['rates'],
'updated_at' => strtotime($data['date'] ?? 'now'),
'source' => 'frankfurter.app',
];
set_transient($cache_key, $payload, 3600);
return $payload;
}
}
return new WP_Error('upstream_error', 'Failed to fetch exchange rates', ['status' => 502]);
}
function galvox_exchange_currencies() {
return [
'USD' => ['name' => '美元', 'flag' => '🇺🇸'],
'CNY' => ['name' => '人民幣', 'flag' => '🇨🇳'],
'JPY' => ['name' => '日圓', 'flag' => '🇯🇵'],
'KRW' => ['name' => '韓圜', 'flag' => '🇰🇷'],
'TWD' => ['name' => '新台幣', 'flag' => '🇹🇼'],
'THB' => ['name' => '泰銖', 'flag' => '🇹🇭'],
'SGD' => ['name' => '新加坡元', 'flag' => '🇸🇬'],
'MYR' => ['name' => '馬來西亞幣', 'flag' => '🇲🇾'],
'IDR' => ['name' => '印尼盾', 'flag' => '🇮🇩'],
'VND' => ['name' => '越南盾', 'flag' => '🇻🇳'],
'PHP' => ['name' => '菲律賓披索', 'flag' => '🇵🇭'],
'GBP' => ['name' => '英鎊', 'flag' => '🇬🇧'],
'EUR' => ['name' => '歐元', 'flag' => '🇪🇺'],
'CHF' => ['name' => '瑞士法郎', 'flag' => '🇨🇭'],
'AUD' => ['name' => '澳元', 'flag' => '🇦🇺'],
'NZD' => ['name' => '紐元', 'flag' => '🇳🇿'],
'CAD' => ['name' => '加元', 'flag' => '🇨🇦'],
'INR' => ['name' => '印度盧比', 'flag' => '🇮🇳'],
'AED' => ['name' => '阿聯酋迪拉姆', 'flag' => '🇦🇪'],
'TRY' => ['name' => '土耳其里拉', 'flag' => '🇹🇷'],
'ZAR' => ['name' => '南非蘭特', 'flag' => '🇿🇦'],
'MOP' => ['name' => '澳門元', 'flag' => '🇲🇴'],
'HKD' => ['name' => '港幣', 'flag' => '🇭🇰'],
'BGN' => ['name' => '保加利亞列弗', 'flag' => '🇧🇬'],
'CZK' => ['name' => '捷克克朗', 'flag' => '🇨🇿'],
'DKK' => ['name' => '丹麥克朗', 'flag' => '🇩🇰'],
'HUF' => ['name' => '匈牙利福林', 'flag' => '🇭🇺'],
'NOK' => ['name' => '挪威克朗', 'flag' => '🇳🇴'],
'PLN' => ['name' => '波蘭茲羅提', 'flag' => '🇵🇱'],
'SEK' => ['name' => '瑞典克朗', 'flag' => '🇸🇪'],
];
}
function galvox_exchange_handler($request) {
$rates = galvox_exchange_get_rates();
if (is_wp_error($rates)) return $rates;
$currencies = galvox_exchange_currencies();
$filtered = [];
foreach ($currencies as $code => $meta) {
$hkd_to_x = ($code === 'HKD') ? 1.0 : ($rates['rates'][$code] ?? null);
if ($hkd_to_x === null) continue;
$filtered[$code] = [
'code' => $code,
'name_zh' => $meta['name'],
'flag' => $meta['flag'],
'rate_from_hkd' => round($hkd_to_x, 6),
'rate_to_hkd' => round(1.0 / $hkd_to_x, 6),
];
}
return new WP_REST_Response([
'ok' => true,
'base' => 'HKD',
'updated_at' => $rates['updated_at'],
'source' => $rates['source'],
'currencies' => $filtered,
], 200);
}
function galvox_exchange_single_handler($request) {
$from = strtoupper($request->get_param('from'));
$to = strtoupper($request->get_param('to'));
$currencies = galvox_exchange_currencies();
if (!isset($currencies[$from]) || !isset($currencies[$to])) {
return new WP_Error('invalid_currency', 'Unsupported currency', ['status' => 400]);
}
$rates = galvox_exchange_get_rates();
if (is_wp_error($rates)) return $rates;
$from_rate = ($from === 'HKD') ? 1.0 : (1.0 / ($rates['rates'][$from] ?? 1));
$to_rate = ($to === 'HKD') ? 1.0 : (1.0 / ($rates['rates'][$to] ?? 1));
$cross = $to_rate / $from_rate;
return new WP_REST_Response([
'ok' => true, 'from' => $from, 'to' => $to,
'rate' => round($cross, 6),
'updated_at' => $rates['updated_at'],
'source' => $rates['source'],
], 200);
}
// ========================================================================
// ===== Phase 2 redirects (added 2026-08-17) =====
add_action('template_redirect', function() {
$redirects = array(
'/travel-insurance-compare-2026/' => '/travel-insurance/',
'/flights/' => '/deals/flights/',
'/hotels/' => '/deals/hotels/',
'/leave-guide/' => '/guides/leave-guide/',
);
$current = $_SERVER['REQUEST_URI'];
foreach ($redirects as $from => $to) {
if (rtrim($current, '/') === rtrim($from, '/')) {
wp_redirect(home_url($to), 301);
exit;
}
}
});
福岡自由行 5日4夜 港人攻略:屋台、太宰府、糸島一次玩透
Skip to content
福岡自由行係近年港人嘅熱門選擇,夏天去最啱!由香港出發,可以揀國泰直飛福岡,大約三個鐘就搞掂;想慳啲就可以經東京轉機,順便食餐壽司再飛過去。六至八月係屋台最旺盛嘅季節,夜晚坐喺中洲食碗拉麵,再搭車去太宰府祈求學業同運勢,真係一個寫意嘅九州假期。
機票交通
由香港飛福岡主要有三間航空公司揀:國泰航空、HK Express 同 Peach Aviation。國泰係傳統航空,行李同服務最穩陣,單程大約三個半鐘;HK Express 票價最平,常常做 promo;Peach 就係廉航代表,轉機平票成日有。落機之後,跟住「福岡地下鐵空港線」指標行,搭五分鐘就到博多站,再轉去天神或者中洲都好方便,基本上唔使額外安排機場接送。
5 大必去景點
1. 太宰府天滿宮:福岡最靈驗嘅神社,供奉學問之神菅原道真,啱晒啲準備考試或者升學嘅港人。由天神搭西鐵去大約三十分鐘,再去埋旁邊嘅表參道買返件梅枝餅食。
2. 博多運河城:大型 shopping mall,集合咗過百間店舖同戲院,連 RAMEN STADIUM 都喺入面,可以一次過食勻日本各地嘅拉麵,落雨天都唔怕冇地方去。
3. 福岡塔:全日本最高嘅海濱塔,234 米高,夜景特別靚,情侶行去睇都幾浪漫,日落前一小時上去最化算。
4. 海中道海濱公園:夏天有個超大泳灘,細路放電一流,旁邊仲有動物園同埋單車徑,一家大細玩成日都唔會悶。
5. 糸島:近年最 hit 嘅文青打卡點,椰林樹影配日落,記得去埋「白糸の滝」同「櫻井二見ヶ浦」睇夫婦岩,影相呃 like 必到。
屋台街 必食
嚟到福岡唔食屋台等於冇嚟過。中洲屋台係最有名嘅一條街,大約二十檔,主打拉麵、關東煮同燒烤,落單嗰陣指手劃腳加句「唔該」就 OK。強烈推薦試吓博多拉麵,豬骨湯底濃而不膩;長浜拉麵就係元祖代表,麵條較幼身、湯底更白。食完主菜,記得帶返盒博多明太子做手信,送禮自用皆可。天氣涼少少就要試もつ鍋(牛腸鍋),醬油湯底配大量韭菜,暖身一流,配啤酒一絕。
建議行程
Day 1:抵達福岡 → 博多站 CHECK-IN → 中洲屋台晚餐 → 河邊散步消食
Day 2:太宰府天滿宮半日遊 → 下午返天神 shopping → 黃昏上福岡塔睇夜景
Day 3:糸島一日遊 → 椰林 cafe 食 brunch → 夫婦岩睇日落
Day 4:海之中道海濱公園放電 → 下午去運河城行街 → 晚餐食もつ鍋
Day 5:朝早去一蘭拉麵總本店朝聖 → 買定手信 → 機場回程
實用貼士
預算:5 日 4 夜,連機票住宿食玩,大約 HKD 9,000-13,000 一位,旺季或櫻花期會再貴啲。
最佳季節:3-4 月賞櫻、6-8 月屋台同海水浴場最旺、11 月睇紅葉,各有特色,夏天去最有 feel。
JR Kyushu Pass:計劃順便去埋長崎或別府嘅港人必買,3 日券約 HKD 850 起,慳好多車錢。
交通 IC 卡:建議買一張「nimoca」,巴士、地鐵、JR 都用到,儲值同香港八達通一樣方便,便利店消費亦可。
總結
福岡自由行對港人嚟講真係超 friendly,直飛時間短、語言唔太成問題、物價又比起東京大阪平一截。五日四夜其實只係剛剛好,如果想玩得鬆少少,建議加多一兩日去埋由布院或者熊本,一次過玩晒九州。總之記住:屋台要去、太宰府要拜、糸島要打卡,你就唔會後悔啦!