var Cli_Data = {"nn_cookie_ids":["_gat_UA-*","_gid","_ga","_ga_*","_fbp","_gcl_au","rc::c","rc::a","cookielawinfo-checkbox-advertisement","CookieLawInfoConsent","WMF-Uniq"],"cookielist":[],"non_necessary_cookies":{"necessary":["rc::c","rc::a","CookieLawInfoConsent"],"analytics":["_gat_UA-*","_gid","_ga","_ga_*"],"advertisement":["_fbp","_gcl_au"],"others":["WMF-Uniq"]},"ccpaEnabled":"","ccpaRegionBased":"","ccpaBarEnabled":"","strictlyEnabled":["necessary","obligatoire"],"ccpaType":"gdpr","js_blocking":"1","custom_integration":"","triggerDomRefresh":"","secure_cookies":""};
var cli_cookiebar_settings = {"animate_speed_hide":"500","animate_speed_show":"500","background":"#FFF","border":"#b1a6a6c2","border_on":"","button_1_button_colour":"#61a229","button_1_button_hover":"#4e8221","button_1_link_colour":"#fff","button_1_as_button":"1","button_1_new_win":"","button_2_button_colour":"#333","button_2_button_hover":"#292929","button_2_link_colour":"#444","button_2_as_button":"","button_2_hidebar":"","button_3_button_colour":"#3566bb","button_3_button_hover":"#2a5296","button_3_link_colour":"#fff","button_3_as_button":"1","button_3_new_win":"","button_4_button_colour":"#000","button_4_button_hover":"#000000","button_4_link_colour":"#333333","button_4_as_button":"","button_7_button_colour":"#61a229","button_7_button_hover":"#4e8221","button_7_link_colour":"#fff","button_7_as_button":"1","button_7_new_win":"","font_family":"inherit","header_fix":"","notify_animate_hide":"1","notify_animate_show":"","notify_div_id":"#cookie-law-info-bar","notify_position_horizontal":"right","notify_position_vertical":"bottom","scroll_close":"","scroll_close_reload":"","accept_close_reload":"","reject_close_reload":"","showagain_tab":"","showagain_background":"#fff","showagain_border":"#000","showagain_div_id":"#cookie-law-info-again","showagain_x_position":"100px","text":"#333333","show_once_yn":"","show_once":"10000","logging_on":"","as_popup":"","popup_overlay":"1","bar_heading_text":"","cookie_bar_as":"banner","popup_showagain_position":"bottom-right","widget_position":"left"};
var log_object = {"ajax_url":"https://rachaelkatiecosmetics.co.uk/wp-admin/admin-ajax.php"};
//# sourceURL=cookie-law-info-js-extra
var wc_single_product_params = {"i18n_required_rating_text":"Please select a rating","i18n_rating_options":["1 of 5 stars","2 of 5 stars","3 of 5 stars","4 of 5 stars","5 of 5 stars"],"i18n_product_gallery_trigger_text":"View full-screen image gallery","review_rating_required":"yes","flexslider":{"rtl":false,"animation":"slide","smoothHeight":true,"directionNav":false,"controlNav":"thumbnails","slideshow":false,"animationSpeed":500,"animationLoop":false,"allowOneSlide":false,"touch":false},"zoom_enabled":"1","zoom_options":[],"photoswipe_enabled":"1","photoswipe_options":{"shareEl":false,"closeOnScroll":false,"history":false,"hideAnimationDuration":0,"showAnimationDuration":0},"flexslider_enabled":"1"};
//# sourceURL=wc-single-product-js-extra
Dermal fillers have taken the cosmetic industry by storm, offering a minimally invasive solution for those looking to turn back the clock on ageing. Unlike traditional surgical treatments, fillers produce rapid effects with little to no downtime, making them an appealing alternative for busy people. In this detailed guide, we'll dig into the topic of dermal fillers, comparing them to other popular procedures like Botox and answering frequently asked questions and concerns.
What are dermal fillers?
Dermal fillers are gel-like compounds composed of hyaluronic acid, a naturally occurring molecule in the skin that maintains moisture and imparts plumpness. When injected under the skin's surface, these fillers restore volume, smooth lines, soften wrinkles, and improve facial features. Dermal fillers are versatile and may be used to treat a variety of regions of the face, including the cheeks, lips, and mouth.
What do dermal fillers do?
In the world of cosmetic dermatology, dermal fillers can be a game changer for aging issues. These fillers act in a variety of ways. They provide volume to thinning lips, creating a fuller and more defined appearance that many people prefer. Fillers can restore youthful plumpness to hollow regions of the face, notably around the cheeks and beneath the eyes, removing the worn appearance that frequently comes with ageing. They also have the extraordinary ability to smooth out face lines and wrinkles, such as nasolabial folds and marionette lines, leaving the skin looking fresher and smoother.
Furthermore, dermal fillers can enhance the look of recessed scars by lifting the depressed skin to the level of the surrounding tissue, making acne or injury scars less visible. They are also skilled at reconstructing contour defects in the face, whether caused by heredity or trauma, therefore correcting asymmetries and restoring balance to facial features.
Dermal fillers can also be used for hand treatments in addition to the face. The back of the hands frequently demonstrates age, with visible veins and a skeletal look. Fillers can help with these concerns, renewing the hands and making them appear younger. Because of its multifaceted approach to addressing age-related issues, dermal fillers are a flexible and widely sought-after cosmetic treatment option.
How long do dermal fillers last?
Dermal fillers' lifetime is determined by a number of factors, including the type of filler used, the area treated, and the patient's metabolism. Most fillers have a shelf life of 6 to 18 months. Some newer, more durable formulas may deliver effects for up to two years. To sustain the intended result, occasional follow-up treatments are advised.
Are dermal fillers safe?
The safety of dermal fillers is a prevalent issue among individuals considering the treatment. Dermal fillers are generally safe when applied by a certified and skilled expert. The products are often created from substances that are biocompatible with the body, such as hyaluronic acid, which is naturally present in the skin.
However, like with any medical therapy, there are certain dangers and adverse effects. These can range from moderate bruising and swelling at the injection site to more unusual problems like as allergic responses or vascular occlusion, in which the filler blocks a blood artery.
It is critical to have a full consultation with a healthcare expert to review any potential hazards and ensure that the treatment is suited to your specific requirements and medical history.
What happens after fillers wear off?
Dermal fillers are not a permanent solution; they are biodegradable and will naturally degrade and be absorbed by the body over time. As the filler dissolves, the skin gradually returns to its natural state before the treatment. The time required for this treatment varies based on the type of filler used, the region treated, and individual characteristics such as metabolism.
Maintenance treatments are necessary to keep the effects in place. These follow-up visits can assist to maintain the improved look established after the original treatment. It also provides an opportunity to review your aesthetic goals with your practitioner and make any necessary revisions.
Are dermal fillers painful?
The perception of pain is subjective and varies widely from person to person. However, when it comes to dermal fillers, most people report that the treatment is rather painless. Most patients report feeling a momentary pinch or pressure at the injection site. To reduce any discomfort, practitioners frequently blend a topical anesthetic lotion or a local anesthetic with the filler.
Some dermal fillers also contain lidocaine, a mild anaesthetic, to provide a more pleasant experience. After the treatment, it is common to suffer transient soreness, which usually goes away within a few days.
What age can you get dermal fillers?
While there is no age limit for utilising dermal fillers, it is typically recommended to consider them when indications of ageing become unpleasant. Most people experience this during their mid-20s and early 30s, when the body's natural collagen synthesis begins to diminish, resulting in the first indications of ageing such as fine lines or a decrease in face volume.
It is important to speak with a skilled specialist who can evaluate your skin's health and prescribe the best age and procedure for fillers, ensuring that the treatment is both safe and effective for your specific requirements.
When to choose botox and when to choose fillers?
The particular problems you want to address will determine which treatment option is best for you: fillers or Botox. The neurotoxin Botox works by temporarily weakening or paralyzing the muscles that cause wrinkles, especially those that are caused by squinting or frowning. Dynamic wrinkles, or lines that show up as you move your face, such frown lines, crow's feet, and forehead creases, respond well to it.
Fillers, on the other hand, are gel-like compounds that replenish lost volume and fullness in the face. They're perfect for static wrinkles, which appear even while your face is at rest. Fillers may fill up thin lips, improve superficial contours, smooth out deeper wrinkles and creases, and even make scars less noticeable. They can also be used to shape and define face features like the jawline and cheekbones.
To summarize, if your major concern is decreasing the look of expression lines, Botox may be the best option. If you want to restore volume, smooth out static wrinkles, or improve face lines, fillers are probably the best solution.
Smooth out wrinkles, restore volume & improve symmetry
Dermal fillers are a very successful and adaptable cosmetic procedure that provides a non-surgical alternative to numerous indications of ageing. They produce quick effects with little downtime, making them an appealing alternative for anyone wishing to improve their looks without requiring a protracted recuperation period. Dermal fillers can smooth out wrinkles, restore volume to depressed areas, improve face symmetry, and rejuvenate the overall look of the skin.
It’s essential to have a detailed consultation with a skincare professional who can assess your individual needs and recommend the most suitable treatment. Whether it’s Botox or fillers, the right choice will depend on your aesthetic goals, the areas of concern, and the type of results you’re hoping to achieve.
Dermal fillers are available at our clinic. Find more information including prices here or book your appointment today here.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-advertisement
1 year
Set by the GDPR Cookie Consent plugin, this cookie records the user consent for the cookies in the "Advertisement" category.
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
CookieLawInfoConsent
1 year
CookieYes sets this cookie to record the default button state of the corresponding category and the status of CCPA. It works only in coordination with the primary cookie.
rc::a
never
This cookie is set by the Google recaptcha service to identify bots to protect the website against malicious spam attacks.
rc::c
session
This cookie is set by the Google recaptcha service to identify bots to protect the website against malicious spam attacks.
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Cookie
Duration
Description
_ga
1 year 1 month 4 days
Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors.
_ga_*
1 year 1 month 4 days
Google Analytics sets this cookie to store and count page views.
_gat_UA-*
1 minute
Google Analytics sets this cookie for user behaviour tracking.n
_gid
1 day
Google Analytics sets this cookie to store information on how visitors use a website while also creating an analytics report of the website's performance. Some of the collected data includes the number of visitors, their source, and the pages they visit anonymously.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Cookie
Duration
Description
_fbp
3 months
Facebook sets this cookie to store and track interactions.
_gcl_au
3 months
Google Tag Manager sets this cookie to experiment advertisement efficiency of websites using their services.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
Cookie
Duration
Description
WMF-Uniq
1 year
Description is currently not available.
(function($) {
$(document).ready(function(){
var maxLength = 120;
$(".show-read-more").each(function(){
var myStr = $(this).text();
if($.trim(myStr).length > maxLength){
var newStr = myStr.substring(0, maxLength);
var removedStr = myStr.substring(maxLength, $.trim(myStr).length);
$(this).empty().html(newStr);
$(this).append('...');
$(this).append(' <a href="javascript:void(0);" class="read-more"> read more</a>');
$(this).append('<span class="more-text">' + removedStr + '</span>');
}
});
$(".read-more").click(function(){
$(this).siblings(".more-text").contents().unwrap();
$(this).remove();
});
});
//$(".page-id-39 .booking-link").attr("href", '#courses').attr('target','_self'); // Set herf value
$(".page-id-39 .booking-link").css("display", 'none');
})(jQuery);
(function($) {$(document).ready(function(){var wi = $(window).width();
if (wi <= 500) {
$('.course-content').each((i, el) => {
let $p = $(el).find('p');
$('.course-img-cont',el).insertAfter($p.eq(0)); // or use the eq here too
$('.course-img-cont').addClass('course-img-cont-mob');
});
} else {
$('.course-content').each((i, el) => {
let $p = $(el).find('p');
$('.course-img-cont',el).insertBefore($('.course-text',el)); // or use the eq here too
$('.course-img-cont').removeClass('course-img-cont-mob');
});
}
$(window).resize(function() {
//as window resizes
var wi = $(window).width();
if (wi <= 500) {
// Inserts image halfway down section
$('.course-content').each((i, el) => {
let $p = $(el).find('p');
$('.course-img-cont',el).insertAfter($p.eq(0)); // or use the eq here too
$('.course-img-cont').addClass('course-img-cont-mob');
});
} else {
// Inserts image back at the top
$('.course-content').each((i, el) => {
let $p = $(el).find('p');
$('.course-img-cont',el).insertBefore($('.course-text',el)); // or use the eq here too
$('.course-img-cont').removeClass('course-img-cont-mob');
});
}
});
});})( jQuery );
// JavaScript: Load video after the main page is ready
window.addEventListener('load', function() {
const lazyVideo = document.querySelector('.lazy-video');
const sources = lazyVideo.querySelectorAll('source');
// Set data-src to src for each source, then tell the video to load
sources.forEach(source => {
source.src = source.dataset.src;
});
lazyVideo.load();
// Optional: Add a class to fade in video after it starts playing
lazyVideo.addEventListener('loadeddata', () => {
document.querySelector('.hero-poster').style.opacity = 0;
});
});
(function($) {
$(document).ready(function(){
$('.more-info').click(function() {
$(this).closest('.treatment').find('.scg-more-info').slideToggle('fast');
let $this = $(this);
let current = $this.text();
let alternate = $this.data('alternate'); // e.g., data-alternate="Show less"
$this.text(alternate).data('alternate', current);});
});
})(jQuery);
(function($) {
$(document).ready(function(){var $header = $('header'); // Replace with your actual header selector
function toggleHeaderOnScroll() {
$header.toggleClass('scrolled', $(window).scrollTop() > 100);
}
if ($('#hero').length === 0) {
// No hero element → always add the class
$header.addClass('scrolled');
} else {
// Hero exists → toggle class on scroll
// Listen to scroll events
$(window).on('scroll', toggleHeaderOnScroll);
// Set initial state (in case page loads already scrolled)
toggleHeaderOnScroll();//toggle class on scroll with perfomrmance consideration
let ticking = false;
$(window).on('scroll', function() {
if (!ticking) {
window.requestAnimationFrame(function() {
$('header').toggleClass('scrolled', $(window).scrollTop() > 100);
ticking = false;
});
ticking = true;
}
});
}
//checks scroll on load
$(window).on('load', function() {
$(window).trigger('scroll');
});
//hero text fade out on scroll
$(window).on('scroll', function() {
if ($(this).scrollTop() > 50) {
$('.hero-cont').stop().fadeTo(800, 0); // fade to transparent
} else {
$('.hero-cont').stop().fadeTo(800, 1); // fade back to opaque
}
});
function isSticky($el) {
var stickyTop = parseInt($el.css('top')); // e.g., 0
var rect = $el[0].getBoundingClientRect();
return rect.top <= stickyTop;
}$(window).on('scroll', function() {
if (isSticky($('#serv-menu'))) {
console.log('Element is currently sticky');
$('#serv-menu').addClass('sticky');
// do something
} else {
console.log('Element is not sticky');
$('#serv-menu').removeClass('sticky');
}
});
});
})(jQuery);
(function($) {
$(document).ready(function(){
// Accordion functionality
$('.more').on('click', function() {
// Toggle active class on the question
$(this).toggleClass('active');// Toggle the answer with sliding effect
$(this).prev('.serv-more').slideToggle('fast');
let $this = $(this);
let current = $this.text();
let alternate = $this.data('alternate'); // e.g., data-alternate="Show less"
$this.text(alternate).data('alternate', current);// Update ARIA attribute for accessibility
// var expanded = $(this).attr('aria-expanded') === 'true' ? false : true;
// $(this).attr('aria-expanded', expanded);
});// Optional: allow keyboard activation (Enter or Space)
$('.more').on('keydown', function(e) {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
$(this).trigger('click');
}
});
// turn ul into w cols
$(document).ready(function() {
$('#sct-serv-list ul, #sct-serv-list ol').each(function() {
var $list = $(this);
var liCount = $list.children('li').length;
if (liCount > 5) {
$list.addClass('multi-column');
}
});
});});
})(jQuery);
(function($) {var minWidth = 1000;// Helper function to check if we are on the excluded post
function isExcludedPost() {
return $('body').hasClass('postid-1351');
}$(document).ready(function() {
// Do nothing if this is the excluded post
if (isExcludedPost()) {
return;
}var wi = $(window).width();if (wi <= minWidth) {
$('.blurb-cont').each((i, el) => {
let $p = $(el).find('p');
let mid = Math.floor($p.length / 2);
$('.blurb-img', el).insertBefore($p.eq(mid));
});
} else {
$('.blurb-cont').each((i, el) => {
let $p = $(el).find('p');
let mid = Math.floor($p.length / 2);
$('.blurb-img', el).insertAfter($('.text-cont', el));
});
}$(window).resize(function() {
// Skip resize logic if excluded post
if (isExcludedPost()) {
return;
}var wi = $(window).width();if (wi <= minWidth) {
$('.blurb-cont').each((i, el) => {
let $p = $(el).find('p');
let mid = Math.floor($p.length / 2);
$('.blurb-img', el).insertBefore($p.eq(mid));
});
} else {
$('.blurb-cont').each((i, el) => {
let $p = $(el).find('p');
let mid = Math.floor($p.length / 2);
$('.blurb-img', el).insertAfter($('.text-cont', el));
});
}
});
});})(jQuery);
jQuery(document).ready(function($) {
// JavaScript for AJAX Search with Post Type Filters
// Search triggers on: button click, Enter key, OR filter changes'use strict';
// Initialize variables
let currentPage = 1;
let searchQuery = $('#ajax-search-input').val().trim();
let selectedPostTypes = [];
let isLoading = false;
let filterChangeTimer = null;
let isInitialLoad = true;
// Get initial post types from checkboxes
function getSelectedPostTypes() {
selectedPostTypes = [];
$('input[name="post_types[]"]:checked').each(function() {
selectedPostTypes.push($(this).val());
});
// If none checked, default to both
if (selectedPostTypes.length === 0) {
selectedPostTypes = ['post', 'service'];
$('input[name="post_types[]"]').prop('checked', true);
}
return selectedPostTypes;
}
// Initialize post types
getSelectedPostTypes();
// Handle checkbox changes with debounce
$('input[name="post_types[]"]').on('change', function() {
clearTimeout(filterChangeTimer);
// If unchecking would leave no boxes checked, prevent it
if ($('input[name="post_types[]"]:checked').length === 0) {
$(this).prop('checked', true);
return;
}
selectedPostTypes = getSelectedPostTypes();
// Only trigger search if we have a search term
if (searchQuery && searchQuery.length > 0) {
filterChangeTimer = setTimeout(function() {
currentPage = 1;
performSearch(searchQuery, currentPage, selectedPostTypes);
updateBrowserURL(searchQuery, currentPage, selectedPostTypes);
}, 300); // 300ms debounce
} else {
// If no search term but we have URL parameters, update URL without search
updateBrowserURL('', 1, selectedPostTypes);
}
});
// Handle form submission (button click)
$('#ajax-search-form').on('submit', function(e) {
e.preventDefault();
triggerSearch();
});
// Handle Enter key press in search input
$('#ajax-search-input').on('keypress', function(e) {
if (e.which === 13) { // Enter key
e.preventDefault();
triggerSearch();
}
});
// Search trigger function
function triggerSearch() {
searchQuery = $('#ajax-search-input').val().trim();
currentPage = 1;
if (searchQuery.length > 0) {
performSearch(searchQuery, currentPage, selectedPostTypes);
updateBrowserURL(searchQuery, currentPage, selectedPostTypes);
} else {
showSearchIntro();
updateBrowserURL('', 1, selectedPostTypes);
}
}
// Handle AJAX pagination clicks
$(document).on('click', '.ajax-page-link', function(e) {
e.preventDefault();
if (isLoading) return;
currentPage = $(this).data('page');
performSearch(searchQuery, currentPage, selectedPostTypes);
updateBrowserURL(searchQuery, currentPage, selectedPostTypes);
$('html, body').animate({
scrollTop: $('#search-results').offset().top - 100
}, 500);
});
// Handle browser back/forward buttons
if (window.history && window.history.pushState) {
window.addEventListener('popstate', function(event) {
if (event.state && event.state.search) {
searchQuery = event.state.search;
currentPage = event.state.page || 1;
selectedPostTypes = event.state.post_types || ['post', 'service'];
$('#ajax-search-input').val(searchQuery);
// Update checkboxes
$('input[name="post_types[]"]').each(function() {
$(this).prop('checked', selectedPostTypes.includes($(this).val()));
});
performSearch(searchQuery, currentPage, selectedPostTypes);
} else if (!event.state || !event.state.search) {
showSearchIntro();
}
});
}
// Perform AJAX search
function performSearch(query, page, postTypes) {
if (isLoading) return;
isLoading = true;
$('.search-loader').css('opacity', '1');
$('#search-submit-btn').prop('disabled', true);
// Add visual feedback for active search
$('.filter-checkbox').addClass('searching');
$.ajax({
url: ajax_search_params.ajax_url,
type: 'POST',
data: {
action: 'ajax_search',
nonce: ajax_search_params.nonce,
query: query,
page: page,
posts_per_page: 10,
post_types: postTypes
},
success: function(response) {
if (response.success) {
$('#search-results').html(response.data.results);
if (response.data.pagination) {
$('#search-pagination').html(response.data.pagination).show();
} else {
$('#search-pagination').hide();
}
// Update active filters display
updateActiveFiltersDisplay();
} else {
$('#search-results').html('<div class="no-results"><p>' + response.data + '</p></div>');
$('#search-pagination').hide();
}
},
error: function(xhr, status, error) {
$('#search-results').html('<div class="error"><p>An error occurred. Please try again.</p></div>');
$('#search-pagination').hide();
console.error('Search error:', error);
},
complete: function() {
isLoading = false;
$('.search-loader').css('opacity', '0');
$('#search-submit-btn').prop('disabled', false);
$('.filter-checkbox').removeClass('searching');
// If this was initial load from URL parameters, mark as done
if (isInitialLoad) {
isInitialLoad = false;
}
}
});
}
// Update active filters display
function updateActiveFiltersDisplay() {
let activeFilters = [];
// Define filter labels
const filterLabels = {
'post': 'Articles',
'service': 'Treatments'
};
// Get active filters based on checkboxes
$('input[name="post_types[]"]:checked').each(function() {
const type = $(this).val();
if (filterLabels[type]) {
activeFilters.push(filterLabels[type]);
}
});
// Update or create active filters display
let activeFiltersElement = $('.active-filters');
if (activeFiltersElement.length === 0) {
activeFiltersElement = $('<div class="active-filters"></div>');
$('.results-header').append(activeFiltersElement);
}
if (activeFilters.length > 0) {
activeFiltersElement.html('<span class="filter-badge">' + activeFilters.join(', ') + '</span>');
} else {
activeFiltersElement.empty();
}
}
// Update browser URL without reloading
function updateBrowserURL(query, page, postTypes) {
if (!window.history || !window.history.pushState) return;
let newURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
let params = [];
if (query) {
params.push('s=' + encodeURIComponent(query));
}
if (page > 1) {
params.push('paged=' + page);
}
// Only add post_types parameter if not showing all types
// But we need to track what's actually selected
if (postTypes && postTypes.length > 0) {
if (postTypes.length === 1) {
// Only one type selected
params.push('post_types[]=' + encodeURIComponent(postTypes[0]));
} else if (postTypes.length === 2) {
// Both selected - we could still include it for clarity, or omit
// Let's include it so URL reflects actual selection
postTypes.forEach(function(type) {
params.push('post_types[]=' + encodeURIComponent(type));
});
}
}
if (params.length > 0) {
newURL += '?' + params.join('&');
}
window.history.pushState({
search: query,
page: page,
post_types: postTypes
}, '', newURL);
// Update page title
if (query) {
let baseTitle = document.title.split('|')[0] || 'Search Results';
document.title = baseTitle.trim() + ' for: ' + query;
} else {
document.title = 'Search' + (document.title.includes('|') ? ' | ' + document.title.split('|').slice(1).join('|') : '');
}
}
// Show search intro message
function showSearchIntro() {
$('#search-results').html(
'<div class="search-intro">' +
'<p>Search through our articles and treatments. Use the filters above to refine your search.</p>' +
'<p>You can search by keyword, treatment name, or article content.</p>' +
'</div>'
);
$('#search-pagination').hide();
}
// Add visual indicator when checkbox triggers search
function setupFilterCheckboxStyles() {
const style = document.createElement('style');
style.textContent = `
.filter-checkbox.searching .checkmark {
border-color: #0073aa;
background-color: rgba(0, 115, 170, 0.1);
}
.filter-checkbox.searching input:checked ~ .checkmark {
background-color: #0073aa;
}
`;
document.head.appendChild(style);
}
// Initialize
$(window).on('load', function() {
// Setup visual styles
setupFilterCheckboxStyles();
// Trigger AJAX search if we have initial search term on page load
if (searchQuery && searchQuery.length > 0) {
setTimeout(function() {
performSearch(searchQuery, currentPage, selectedPostTypes);
}, 100);
}
// Add visual feedback for checkboxes
$('input[name="post_types[]"]').on('mousedown', function() {
$(this).closest('.filter-checkbox').addClass('clicking');
}).on('mouseup mouseleave', function() {
$(this).closest('.filter-checkbox').removeClass('clicking');
});
});})(jQuery);
var ajax_search_params = {
ajax_url: 'https://rachaelkatiecosmetics.co.uk/wp-admin/admin-ajax.php',
nonce: '0b568a8001'
};
var sbiajaxurl = "https://rachaelkatiecosmetics.co.uk/wp-admin/admin-ajax.php";