Johan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Display Site Title Text on WP LogIn in pageFound it and solved it, thank you
Forum: Fixing WordPress
In reply to: Display Site Title Text on WP LogIn in page@sterndata Hello, yes, but I can not find any help with my specific request about calling the page title if Im not mistaken.
@jtsternberg
got it! I gave you the wring prefix I think. Just changed it to the_weston_title_
instead and now its working!function no_default_color() { $cmb = cmb2_get_metabox( '_weston_title_options' ); if ( $cmb ) { $cmb->update_field_property( '_weston_title_color', 'default', '' ); } } add_action( 'cmb2_init_before_hookup', 'no_default_color' );
Don’t know if you need this but this is the whole part reguarding the Header Options and Title Options…
//Header Options add_action( 'cmb2_init', 'weston_register_header_metabox' ); function weston_register_header_metabox() { $prefix = '_weston_header_'; $cmb_header = new_cmb2_box( array( 'id' => $prefix . 'options', 'title' => __( 'Header Options', 'weston' ), 'object_types' => array( 'project','page','post', 'product' ), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true ) ); $cmb_header->add_field( array( 'name' => __( 'Hide Header', 'weston' ), 'desc' => __( 'Choose to hide or show the header on this page.', 'weston' ), 'id' => $prefix . 'hide', 'type' => 'select', 'options' => array( 'no' => __( 'No', 'weston' ), 'yes' => __( 'Yes', 'weston' ) ), ) ); $cmb_header->add_field( array( 'name' => __( 'Transparent Background', 'weston' ), 'desc' => __( 'Make the site header background transparent on this page.', 'weston' ), 'id' => $prefix . 'transparent_bg', 'type' => 'select', 'options' => array( 'no' => __( 'No', 'weston' ), 'yes' => __( 'Yes', 'weston' ) ), ) ); $cmb_header->add_field( array( 'name' => __( 'Color Scheme', 'weston' ), 'desc' => __( 'Make the contents of the header light or dark for this page. Only applies if Transparent Background is enabled.', 'weston' ), 'id' => $prefix . 'color_scheme', 'type' => 'select', 'options' => array( 'dark' => __( 'Dark', 'weston' ), 'light' => __( 'Light', 'weston' ) ), ) ); $cmb_header->add_field( array( 'name' => __( 'Menu Color', 'weston' ), 'id' => $prefix . 'menu_color', 'type' => 'colorpicker', 'default' => '' ) ); $cmb_header->add_field( array( 'name' => __( 'Menu Color Hover', 'weston' ), 'id' => $prefix . 'menu_hover_color', 'type' => 'colorpicker', 'default' => '' ) ); $cmb_header->add_field( array( 'name' => __( 'Main Menu', 'weston' ), 'desc' => __( 'Select a different main menu to show on this page.', 'weston' ), 'id' => $prefix . 'menu_main', 'type' => 'select', 'options' => customMenus(), ) ); $cmb_header->add_field( array( 'name' => __( 'Mobile Menu', 'weston' ), 'desc' => __( 'Select a different mobile menu to show on this page.', 'weston' ), 'id' => $prefix . 'menu_mobile', 'type' => 'select', 'options' => customMenus(), ) ); $cmb_header->add_field( array( 'name' => __( 'Left Menu (Split Header)', 'weston' ), 'desc' => __( 'Select a different left menu to show on this page. For use with Split Header layout.', 'weston' ), 'id' => $prefix . 'menu_left', 'type' => 'select', 'options' => customMenus(), ) ); } //Title Options add_action( 'cmb2_init', 'weston_register_title_metabox' ); function weston_register_title_metabox() { $prefix = '_weston_title_'; $cmb_title = new_cmb2_box( array( 'id' => $prefix . 'options', 'title' => __( 'Title Area Options', 'weston' ), 'object_types' => array( 'page', 'project', 'post', 'product'), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true ) ); $cmb_title->add_field( array( 'name' => __( 'Show Title Area', 'weston' ), 'desc' => __( 'Hide or show the page title area.', 'weston' ), 'id' => $prefix . 'show', 'type' => 'select', 'show_option_none' => false, 'options' => array( 'yes' => __( 'Yes', 'weston' ), 'no' => __( 'No', 'weston' ), ), ) ); $cmb_title->add_field( array( 'name' => __( 'Subtitle Text', 'weston' ), 'desc' => __( 'This text will be displayed below the title on pages and projects.', 'weston' ), 'id' => $prefix . 'subtitle', 'type' => 'text' ) ); $cmb_title->add_field( array( 'name' => __( 'Hide Text', 'weston' ), 'id' => $prefix . 'hide_text', 'type' => 'select', 'options' => array( 'no' => __( 'No', 'weston' ), 'yes' => __( 'Yes', 'weston' ), ), ) ); $cmb_title->add_field( array( 'name' => __( 'Title Image', 'weston' ), 'desc' => __( 'This image will appear above the title text.', 'weston' ), 'id' => $prefix . 'img', 'type' => 'file', ) ); $cmb_title->add_field( array( 'name' => __( 'Title Alignment', 'weston' ), 'id' => $prefix . 'alignment', 'type' => 'select', 'options' => array( '' => __( 'Default', 'weston' ), 'center' => __( 'Center', 'weston' ), 'left' => __( 'Left', 'weston' ), 'right' => __( 'Right', 'weston' ) ), ) ); $cmb_title->add_field( array( 'name' => __( 'Title Area Height', 'weston' ), 'desc' => __( 'Set the height of the title area in pixels. (ex. 400)', 'weston' ), 'id' => $prefix . 'area_height', 'type' => 'text_small' ) ); $cmb_title->add_field( array( 'name' => __( 'Title Background Image', 'weston' ), 'desc' => __( 'Upload an image or enter a URL.', 'weston' ), 'id' => $prefix . 'bg_img', 'type' => 'file', ) ); $cmb_title->add_field( array( 'name' => __( 'Enable Background Parallax', 'weston' ), 'id' => $prefix . 'parallax', 'type' => 'select', 'options' => array( 'no' => __( 'No', 'weston' ), 'yes' => __( 'Yes', 'weston' ), ), ) ); $cmb_title->add_field( array( 'name' => __( 'Title Text Color', 'weston' ), 'id' => $prefix . 'color', 'type' => 'colorpicker', 'default' => '#FFFFFF' ) ); }
- This reply was modified 7 years, 2 months ago by Johan.
@jtsternberg I tried to copy this to the child theme funcions.php but when creating a new page it sill picks #191919 as default I’m afraid….
Hello and thanks for your replies!
@jtsternberg
I guess you mean this part?Prefix:
$prefix = '_weston_header_';
Is this the ID you mean:
$cmb_title = new_cmb2_box( array( 'id' => $prefix . 'options', 'title' => __( 'Title Area Options', 'weston' ), 'object_types' => array( 'page', 'project', 'post', 'product'), // Post type 'context' => 'normal', 'priority' => 'high', 'show_names' => true ) );
Forum: Plugins
In reply to: [Comet Cache] Custom Facebook Feed vs Comet CacheHi and thanks for your response.
Can you by any chance provide me the URI code that I need to add to Comet Cache → Plugin Options → URI Exclusion Patterns.The page is this one.
Hi! A Comet Cache developer gave me this answer below.
Can you give me any hint on what would be the best solution to solve the problem?
Thank you very much.Comet Cache is a page caching plugin, which means it captures the output from WordPress and stores that output in a static HTML file, only updating the static HTML file when the WordPress content changes.
For that reason, any plugins that produce dynamic content (such as the Custom Facebook Feed plugin) must take into consideration WordPress caching plugins, either by telling the WordPress caching plugin not to cache the page where the plugin is located, or, even better, making use of client-side JavaScript to dynamically update the content so that the plugin is unaffected by server-side caching.
If the Custom Facebook Feed plugin is not compatible with WordPress caching plugins, you can exclude the page where the Facebook feed shows up by excluding the URI of the page in Comet Cache → Plugin Options → URI Exclusion Patterns. Otherwise, I recommend contacting the plugin developer(s) for Custom Facebook Feed and asking them about compatibility with caching plugins.
Forum: Plugins
In reply to: [Portfolio Slideshow] Can’t remove Ticks in SettingsSame problem here. Totally a very big issue. :/
If anyone has resolved this any tips would be very helpful.Forum: Plugins
In reply to: [Comet Cache] Prevent caching when site visited by botHi there this is what the developer at Weglot wanted me to add to that field. Can you see if this make sense in your opinion? Thank you.
/bot|favicon|crawl|facebook|Face|slurp|spider
Forum: Plugins
In reply to: [Comet Cache] All meta tags dissa disappear when CC activatedHi, no actually it was just because I did a developer posting test on Facebook where one can test how the post will look before posting. And it was there I saw that Facebook could not receive any meta info from the site when CC turned on, not even the page title. As soon as I switched in off all the info came back and the post looked great and I could see that Facebook could grab all the different meta tags.
Forum: Plugins
In reply to: [Comet Cache] All meta tags dissa disappear when CC activatedHi Raam. Ok, thank you for the reply!
Nope, the only plugin that I can think of would conflict is Yoast SEO ?
In any case I don’t have a specific meta tag plugin for sure I’m afraid.Forum: Plugins
In reply to: [Custom Login] Retina logoYou have probably solved it by now, bit in case anyone else is wondering.
Make your logo 600px wide and then add this to the custom css:.login h1 a { background-size: 300px !important; }
That should do it.
Problem solved by increasing the size of the Single Product Image under Woocommerce > Settings > Products > Display .
And then regenerate thumbnails using this plugin.Also the theme I’m using is not displaying the Featured Image set for the single products in the Product slider. So therefore one has to add the same image to the Product Gallery. So when switching to WZM the same image is displayed twice, so had to remove the Gallery Image and only use the featured and now it all works fine.
Forum: Fixing WordPress
In reply to: Can't change WP language from Swedish to English – snaps backYou were so correct as can be. just got rid of the translation plugin and I can swich to any langue now. Thank you for your tip!
~ Johan