I have added some code to add another setting for making the title above the order confirmation (webpage + mail) configurable via admin ui + added the call to WordPress filters to make output for order summary page and order mail programmatically configurable.
--- src/includes/class-settings.org.php 2024-07-05 10:16:52.648035283 +0200
+++ src/includes/class-settings.php 2024-07-05 10:39:09.851014367 +0200
@@ -419,6 +419,15 @@
}
/**
+ * Show setting to get title for tables in order details.
+ */
+ public static function header_title_setting() {
+ $title = get_option('cffu_header_title', 'Fields and files');
+
+ echo '<input type="text" name="cffu_header_title" value="'.$title.'">';
+ }
+
+ /**
* Show setting to hide default WooCommerce order notes.
*/
public static function hide_notes_setting() {
@@ -441,6 +450,11 @@
register_setting(
'cffu_settings',
+ 'cffu_header_title'
+ );
+
+ register_setting(
+ 'cffu_settings',
'cffu_hide_notes'
);
@@ -466,6 +480,14 @@
'fields-and-file-upload-settings',
'cffu_config_settings'
);
+
+ add_settings_field(
+ 'cffu_header_title_setting',
+ 'Caption title placed above table of fields in order confirmation',
+ [ __CLASS__, 'header_title_setting' ],
+ 'fields-and-file-upload-settings',
+ 'cffu_config_settings'
+ );
add_settings_field(
'cffu_hide_note_setting',
--- src/includes/class-display.org.php 2024-07-05 10:17:40.130720742 +0200
+++ src/includes/class-display.php 2024-07-05 10:58:03.315635800 +0200
@@ -278,9 +278,19 @@
return;
}
- echo '<h2 class="woocommerce-column__title">Fields and files</h2>';
+ $title = get_option('cffu_header_title', 'Fields and files');
+
+ ob_start();
+ echo '<section class="woocommerce-customer-details">';
+ echo '<h2 class="woocommerce-column__title">'.$title.'</h2>';
self::show_fields_for_order( $order );
+
+ echo '</section>';
+ $html = ob_get_contents();
+ ob_end_clean();
+
+ echo apply_filters('cffu_show_order', $html);
}
/**
@@ -315,8 +325,15 @@
return;
}
- echo '<h2>Fields and files</h2>';
+ $title = get_option('cffu_header_title', 'Fields and files');
+ ob_start();
+ echo '<h2>'.$title.'</h2>';
self::show_fields_for_order( $order, true );
+ $html = ob_get_contents();
+ ob_end_clean();
+
+ echo apply_filters('cffu_email_table', $html);
+
}
}
Cheers,
Matthieu
]]>I am looking to hide the header/title of the post when the post is displayed on the webpage. Other aspects of the page are already showing the information.
Is there a setting that could be used to not show the header/title?
Thanks,
Glenn
However, I only want to hide the header title on pages, and show it on posts. (I’m surprised you treat these two very different content types the same for this!)
Is there a way I can do this with CSS? I can’t find a hook that distinguishes pages from posts.
Thanks
]]>The content of the title and description of the header has disappeared. I can only display the button (right now it has no text).
Before if I could see it. I don’t know what could have happened.
Thank you,
]]>I installed it today and the Header Text was working but somehow now it fails to load the content.
I have confirmed that Disable Logo/Text is set to No and I have toggled that setting to see if it would correct the problem, but to no avail.
I also have looked to refresh the plugins default install settings but cannot find how to do that; when reinstalling the plug after both uninstalling it and deleting the directory the custom setting are still sticking – I cannot replicate a clean install.
In the HTML the H3 tags load with no title if that is helpful.
]]>h1.hero-title {
display: none;
}
Any help much appreciated as I have spent a long time trying to solve this.
Thanks
Thank you
]]>https://verbavolant.altervista.org/
if my css is:
.page-header-title { display: none;}
it removes even inside single post:
https://verbavolant.altervista.org/2020/08/18-a-msfs2020/
many thanks
]]>