diff --git a/includes/blocks/lcp-viewport/src/save.js b/includes/blocks/lcp-viewport/src/save.js
index 04f04ca..4f20224 100644
--- a/includes/blocks/lcp-viewport/src/save.js
+++ b/includes/blocks/lcp-viewport/src/save.js
@@ -10,16 +10,22 @@ import { useBlockProps, InnerBlocks } from '@wordpress/block-editor';
* @return {Element} Element to render.
*/
export default function Save({ attributes }) {
- const { hasSidecontent, hasStickyHeader } = attributes; // Retrieve the hasSidecontent and hasStickyHeader attributes
+ const { hasSidecontent, headerContainerStickyType } = attributes; // Retrieve the attributes
const blockProps = useBlockProps.save();
- // Conditionally add the 'has-sidecontent' and 'lcp-has-sticky-header' classes
+ // Conditionally add classes based on attributes
let classNames = '';
+
+ // Add 'has-sidecontent' class if attribute is true
if (hasSidecontent) {
classNames += 'lcp-has-sidecontent ';
}
- if (hasStickyHeader) {
- classNames += 'lcp-has-sticky-header';
+
+ // Conditionally add sticky header classes based on the headerContainerStickyStyle value
+ if (headerContainerStickyType === 'always') {
+ classNames += 'lcp-has-sticky-header ';
+ } else if (headerContainerStickyType === 'onScroll') {
+ classNames += 'lcp-has-sticky-on-scroll-header ';
}
return (
diff --git a/includes/classes/backend.php b/includes/classes/backend.php
index 69a4b0e..31409ff 100644
--- a/includes/classes/backend.php
+++ b/includes/classes/backend.php
@@ -234,7 +234,7 @@ add_action( 'wp_footer', function() {
-
+// Register the settings page with tabs
function render_lcp_theme_settings_page() {
?>
@@ -244,26 +244,35 @@ function render_lcp_theme_settings_page() {
- - Icons
+ - Custom Meta
+ - Icons
- Custom Code
-
+
+
Custom SVG Icons
+
+
+
+
+
Custom Code Settings
@@ -299,8 +308,9 @@ function render_lcp_theme_settings_page() {
-// Hooks
+/* HIGHLIGHT-TO-SHARE */
+ // Render the highlight-to-share popup
function highlight_to_share_popup() {
echo "