/**
* Theme functions and definitions
*
* @package HelloElementor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
define( 'HELLO_ELEMENTOR_VERSION', '2.9.0' );
if ( ! isset( $content_width ) ) {
$content_width = 800; // Pixels.
}
if ( ! function_exists( 'hello_elementor_setup' ) ) {
/**
* Set up theme support.
*
* @return void
*/
function hello_elementor_setup() {
if ( is_admin() ) {
hello_maybe_update_theme_version_in_db();
}
if ( apply_filters( 'hello_elementor_register_menus', true ) ) {
register_nav_menus( [ 'menu-1' => esc_html__( 'Header', 'hello-elementor' ) ] );
register_nav_menus( [ 'menu-2' => esc_html__( 'Footer', 'hello-elementor' ) ] );
}
if ( apply_filters( 'hello_elementor_post_type_support', true ) ) {
add_post_type_support( 'page', 'excerpt' );
}
if ( apply_filters( 'hello_elementor_add_theme_support', true ) ) {
add_theme_support( 'post-thumbnails' );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'title-tag' );
add_theme_support(
'html5',
[
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'script',
'style',
]
);
add_theme_support(
'custom-logo',
[
'height' => 100,
'width' => 350,
'flex-height' => true,
'flex-width' => true,
]
);
/*
* Editor Style.
*/
add_editor_style( 'classic-editor.css' );
/*
* Gutenberg wide images.
*/
add_theme_support( 'align-wide' );
/*
* WooCommerce.
*/
if ( apply_filters( 'hello_elementor_add_woocommerce_support', true ) ) {
// WooCommerce in general.
add_theme_support( 'woocommerce' );
// Enabling WooCommerce product gallery features (are off by default since WC 3.0.0).
// zoom.
add_theme_support( 'wc-product-gallery-zoom' );
// lightbox.
add_theme_support( 'wc-product-gallery-lightbox' );
// swipe.
add_theme_support( 'wc-product-gallery-slider' );
}
}
}
}
add_action( 'after_setup_theme', 'hello_elementor_setup' );
function hello_maybe_update_theme_version_in_db() {
$theme_version_option_name = 'hello_theme_version';
// The theme version saved in the database.
$hello_theme_db_version = get_option( $theme_version_option_name );
// If the 'hello_theme_version' option does not exist in the DB, or the version needs to be updated, do the update.
if ( ! $hello_theme_db_version || version_compare( $hello_theme_db_version, HELLO_ELEMENTOR_VERSION, '<' ) ) {
update_option( $theme_version_option_name, HELLO_ELEMENTOR_VERSION );
}
}
if ( ! function_exists( 'hello_elementor_scripts_styles' ) ) {
/**
* Theme Scripts & Styles.
*
* @return void
*/
function hello_elementor_scripts_styles() {
$min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
if ( apply_filters( 'hello_elementor_enqueue_style', true ) ) {
wp_enqueue_style(
'hello-elementor',
get_template_directory_uri() . '/style' . $min_suffix . '.css',
[],
HELLO_ELEMENTOR_VERSION
);
}
if ( apply_filters( 'hello_elementor_enqueue_theme_style', true ) ) {
wp_enqueue_style(
'hello-elementor-theme-style',
get_template_directory_uri() . '/theme' . $min_suffix . '.css',
[],
HELLO_ELEMENTOR_VERSION
);
}
}
}
add_action( 'wp_enqueue_scripts', 'hello_elementor_scripts_styles' );
if ( ! function_exists( 'hello_elementor_register_elementor_locations' ) ) {
/**
* Register Elementor Locations.
*
* @param ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager $elementor_theme_manager theme manager.
*
* @return void
*/
function hello_elementor_register_elementor_locations( $elementor_theme_manager ) {
if ( apply_filters( 'hello_elementor_register_elementor_locations', true ) ) {
$elementor_theme_manager->register_all_core_location();
}
}
}
add_action( 'elementor/theme/register_locations', 'hello_elementor_register_elementor_locations' );
if ( ! function_exists( 'hello_elementor_content_width' ) ) {
/**
* Set default content width.
*
* @return void
*/
function hello_elementor_content_width() {
$GLOBALS['content_width'] = apply_filters( 'hello_elementor_content_width', 800 );
}
}
add_action( 'after_setup_theme', 'hello_elementor_content_width', 0 );
if ( ! function_exists( 'hello_elementor_add_description_meta_tag' ) ) {
/**
* Add description meta tag with excerpt text.
*
* @return void
*/
function hello_elementor_add_description_meta_tag() {
if ( ! apply_filters( 'hello_elementor_description_meta_tag', true ) ) {
return;
}
if ( ! is_singular() ) {
return;
}
$post = get_queried_object();
if ( empty( $post->post_excerpt ) ) {
return;
}
echo '' . "\n";
}
}
add_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
// Admin notice
if ( is_admin() ) {
require get_template_directory() . '/includes/admin-functions.php';
}
// Settings page
require get_template_directory() . '/includes/settings-functions.php';
// Allow active/inactive via the Experiments
require get_template_directory() . '/includes/elementor-functions.php';
if ( ! function_exists( 'hello_elementor_check_hide_title' ) ) {
/**
* Check whether to display the page title.
*
* @param bool $val default value.
*
* @return bool
*/
function hello_elementor_check_hide_title( $val ) {
if ( defined( 'ELEMENTOR_VERSION' ) ) {
$current_doc = Elementor\Plugin::instance()->documents->get( get_the_ID() );
if ( $current_doc && 'yes' === $current_doc->get_settings( 'hide_title' ) ) {
$val = false;
}
}
return $val;
}
}
add_filter( 'hello_elementor_page_title', 'hello_elementor_check_hide_title' );
/**
* BC:
* In v2.7.0 the theme removed the `hello_elementor_body_open()` from `header.php` replacing it with `wp_body_open()`.
* The following code prevents fatal errors in child themes that still use this function.
*/
if ( ! function_exists( 'hello_elementor_body_open' ) ) {
function hello_elementor_body_open() {
wp_body_open();
}
}
Resist the impulse to invest in the first trinket you view. On the contrary, set a souvenir cap—$20 per trip works for me.
Use that amount to purchase a single high‑quality item, like a handcrafted notebook, rather than three cheap magnets. The rule of thumb: if the item costs more than the sum volume you’d use up on meals for a day, it’s probably not worth it.
Street vendors and local markets are where the real savings hide. In Bangkok, a bowl of noodle soup costs $1.20, versus $8 for a restaurant version of the same dish. A simple rule: if a menu entry is priced under $5, it’s likely a local staple; over $12, you’re probably paying for ambiance. Bring a reusable drinking water bottle—refilling at public fountains saves $2‑$3 per day and reduces plastic waste.
Even a travel‑savvy itinerary can feel restrictive if you not once sanction yourself a treat. I program one “splurge night” per trip, budgeting $25 for a nice dinner or a cultural show. Knowing you have a designated indulgence makes the recuperate of the budget easier to stick to.
Before you even pick a destination, list the fixed costs you can’t avoid: transportation to the start point, accommodation, and any required tickets (museums, parks, etc.). For a typical two‑night abide in a mid‑tier town, I’ve found that $120 for a hostel, $60 for a round‑trip bus, and $30 for entry fees are common benchmarks. Write those numbers down, then add a 10‑15 % buffer for unexpected expenses. The buffer isn’t a safety net for splurging; it’s a cushion for things like a delayed train or a last‑moment weather‑related gear purchase.
This is something that deserves careful consideration from every team member.
Every city has at least one liberated museum day or a public green with guided tours. Check the municipal tourism online presence a week before you leave; they often list “free this weekend” events. In addition, many cafés cards dealt out loyalty cards—after five coffees, the sixth is free. It’s a tiny saving, yet it adds up when you’re sipping espresso daily.
Hostels with shared kitchens can slice your cuisine bill by half. On a recent trip to Portland, I booked a dormitory for $35 per night along with used the communal kitchen to prepare breakfast and dinner. The aggregate cost for meals dropped from an estimated $60 to $25. If you prefer a private room, look for places that offer a free breakfast or include a mini‑fridge stocked with complimentary snacks. Booking platforms often display “instant discount” rates for stays longer than three nights—prepare a weekend plus a day to trigger that reduction.
Public transit passes repeatedly beat single‑ticket fares. In Berlin, a 48‑period day ticket is €9, while three separate rides would cost €12. For intercity travel, book trains or buses at least two weeks in advance; early‑bird discounts can be as high as 40 %. Car‑sharing services are useful for short hops, but compare the per‑mile cost to a rental—once in a while a $30 daily rental is cheaper than $0.60 per mile on a shared vehicle.
In the end, it comes down to a scattering of key habits.
While I’m mapping out routes plus savings, I also unwind with a quick gaming session on my phone. It’s a low‑cost method to keep the head sharp during long bus rides, and the occasional in‑app purchase fits neatly into the 10 % buffer I set aside for entertainment. For those who enjoy tweaking gear, the site mystake offers a handy reference for budgeting accessories without breaking the bank.
The key isn’t to starve your travel journey, however to allocate every dollar deliberately. Kick off with a clear baseline, decide on cost‑result-driven lodging, eat where locals consume, and apply transit passes wisely. Add a modest buffer, itinerary one indulgence, and you’ll complete each adventure with both memories and money left in your pocket. That’s the real reward of bright budgeting—more journeys ahead.
]]>