Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Search Results for 'child theme'

Home / Forums / Search / Search Results for 'child theme'

Viewing 20 results - 581 through 600 (of 6,404 total)
  • Author
    Search Results
  • #257240

    Hi Ben and team. I am wanting a different menu depending on the page the user is viewing. I will include code below on how we did it via Beaver Build in case it helps, but am wondering if there is ay way with Kadence Theme to do it via a custom header/menu only on certain pages that does not require custom code. If not, no worries, but thought I would check. Thanks.

    One idea would be to maybe use elements and then load the menu as an element on certain pages and disable the normal menu via the page settings. Is that a good idea? Any performance concerns vs custom PHP?

    `<?php

    /**
    * Helper class for theme functions.
    *
    * @class FLChildTheme
    */
    final class FLChildTheme {

    /**
    * @method styles
    */
    static public function stylesheet() {
    $css_ver = filemtime( get_stylesheet_directory() . ‘/style.css’ );
    echo ‘<link rel=”stylesheet” href=”‘ . FL_CHILD_THEME_URL . ‘/style.css?ver=’ . $css_ver . ‘” />’;
    }

    /**
    * Renders the markup for the fixed header.
    *
    * @since 1.0
    * @return void
    */
    static public function fixed_header() {

    // Prevet showing fixed header on the Logo Page tempale
    if ( is_page_template( ‘page-templates/page-logo.php’ ) ) {
    return;
    }

    $header_layout = FLTheme::get_setting( ‘fl-fixed-header’ );
    $header_enabled = apply_filters( ‘fl_fixed_header_enabled’, true );

    if ( ‘visible’ == $header_layout && $header_enabled ) {
    get_template_part( ‘includes/fixed-header’ );
    }
    }

    /**
    * Renders the markup for the main header.
    *
    * @since 1.0
    * @return void
    */
    static public function header_layout() {
    $header_layout = FLTheme::get_setting( ‘fl-header-layout’ );
    $header_enabled = apply_filters( ‘fl_header_enabled’, true );

    if ( ‘none’ != $header_layout && $header_enabled ) {
    if ( is_page( array( ‘cart’, ‘checkout’ ) ) ) {
    get_template_part( ‘includes/nav-without’ );
    } else {
    get_template_part( ‘includes/nav-‘ . $header_layout );
    }
    }
    }

    /**
    * Regiser the menu in the main header.
    *
    * @since 1.0
    * @return void
    */
    static public function register_menus() {

    unregister_nav_menu( ‘header’ );

    register_nav_menus( array(
    ‘back-to-top’ => esc_html__( ‘Back-To-Top Menu’, ‘bb-theme-5dd’ ),
    ) );
    register_nav_menus( array(
    ‘customer’ => esc_html__( ‘Customer Menu’, ‘bb-theme-5dd’ ),
    ) );
    register_nav_menus( array(
    ‘sale’ => esc_html__( ‘Sale Menu’, ‘bb-theme-5dd’ ),
    ) );
    register_nav_menus( array(
    ‘non-sale’ => esc_html__( ‘Non-Sale Menu’, ‘bb-theme-5dd’ ),
    ) );
    register_nav_menus( array(
    ‘affiliate’ => esc_html__( ‘Affiliate Menu’, ‘bb-theme-5dd’ ),
    ) );
    register_nav_menus( array(
    ‘sale-party’ => esc_html__( ‘Sale Menu – Party Page’, ‘bb-theme-5dd’ ),
    ) );
    }

    /**
    * Renders the menu in the main header.
    *
    * @since 1.0
    * @return void
    */
    static public function header_menus() {

    $header_layout = FLTheme::get_setting( ‘fl-header-layout’ );

    if ( is_page_template( ‘page-templates/page-logo.php’ ) ) {
    /*
    * If page template is “Logo Page”, show no menu
    * @since 1.0
    */
    return;
    }
    elseif ( is_page( array(
    52426, // affiliate-area/about
    )
    )
    ) {
    wp_nav_menu( array(
    ‘theme_location’ => ‘back-to-top’,
    ‘items_wrap’ => ‘<ul id=”%1$s” class=”nav navbar-nav ‘ .
    ( ‘right’ === $header_layout ? ‘navbar-right’ : ” ) . ‘ %2$s”>%3$s</ul>’,
    ‘container’ => false,
    ‘fallback_cb’ => ‘FLTheme::nav_menu_fallback’,
    ) );
    }
    elseif ( is_page( array(
    115611, // vcb-iii-party
    115882, // vcb-iii-kickstart
    142873, // vcb-iv-party
    147539, // vcb-iv-sumo
    )
    )
    ) {
    wp_nav_menu( array(
    ‘theme_location’ => ‘sale-party’,
    ‘items_wrap’ => ‘<ul id=”%1$s” class=”nav navbar-nav ‘ .
    ( ‘right’ === $header_layout ? ‘navbar-right’ : ” ) . ‘ %2$s”>%3$s</ul>’,
    ‘container’ => false,
    ‘fallback_cb’ => ‘FLTheme::nav_menu_fallback’,
    ) );
    }
    elseif ( is_page( array(
    142766, // vcb-iv-kickstart
    )
    )
    ) {
    wp_nav_menu( array(
    ‘theme_location’ => ‘blank-menu’,
    ‘items_wrap’ => ‘<ul id=”%1$s” class=”nav navbar-nav ‘ .
    ( ‘right’ === $header_layout ? ‘navbar-right’ : ” ) . ‘ %2$s”>%3$s</ul>’,
    ‘container’ => false,
    ‘fallback_cb’ => ‘FLTheme::nav_menu_fallback’,
    ) );
    }
    elseif ( is_page(
    /*
    * If page slug is in array, use ‘customer’ navigation menu
    * @since 1.0
    */
    array(
    52266, // my-account
    52475, // my-account/faqs/
    )
    )
    ) {
    wp_nav_menu( array(
    ‘theme_location’ => ‘customer’,
    ‘items_wrap’ => ‘<ul id=”%1$s” class=”nav navbar-nav ‘ .
    ( ‘right’ === $header_layout ? ‘navbar-right’ : ” ) . ‘ %2$s”>%3$s</ul>’,
    ‘container’ => false,
    ‘fallback_cb’ => ‘FLTheme::nav_menu_fallback’
    ) );
    }
    elseif ( is_page(
    /*
    * If page slug is in array, use ‘affiliate’ navigation menu
    * @since 1.0
    */
    array(
    38, // affiliate-area
    52480, // entry
    52456, // affiliate-area/contact/
    52473, // affiliate-area/faqs/
    52434, // affiliate-area/products/
    60177, // affiliate-area/resources/
    88825, // my-profile
    142212, // affiliate-area/resources/smart-goals/
    124419, // affiliate-area/products/
    217193, // affiliate-area/resources/difference-makers/
    217585, // partner-onboarding-2/
    216459, //partner-onboarding/
    )
    )
    || ‘contributor’ === get_post_type()
    ) {
    wp_nav_menu( array(
    ‘theme_location’ => ‘affiliate’,
    ‘items_wrap’ => ‘<ul id=”%1$s” class=”nav navbar-nav ‘ .
    ( ‘right’ === $header_layout ? ‘navbar-right’ : ” ) . ‘ %2$s”>%3$s</ul>’,
    ‘container’ => false,
    ‘fallback_cb’ => ‘FLTheme::nav_menu_fallback’
    ) );
    }
    elseif ( is_page(
    /*
    * If page slug is in array, use ‘sale’ navigation menu
    * @since 1.0
    */
    array(
    52353, // iii
    52533, // bb-i
    52829, // bb-i-1
    52910, // bb-i-2
    52958, // bb-i-3
    52981, // bb-i-4
    53001, // bb-i-5
    )
    )
    ) {
    wp_nav_menu( array(
    ‘theme_location’ => ‘sale’,
    ‘items_wrap’ => ‘<ul id=”%1$s” class=”nav navbar-nav ‘ .
    ( ‘right’ === $header_layout ? ‘navbar-right’ : ” ) . ‘ %2$s”>%3$s</ul>’,
    ‘container’ => false,
    ‘fallback_cb’ => ‘FLTheme::nav_menu_fallback’
    ) );
    }
    else {
    wp_nav_menu( array(
    /*
    * If page slug is not above, use ‘non-sale’ menu
    * @since 1.0
    */
    ‘theme_location’ => ‘non-sale’,
    ‘items_wrap’ => ‘<ul id=”%1$s” class=”nav navbar-nav ‘ .
    ( ‘right’ === $header_layout ? ‘navbar-right’ : ” ) . ‘ %2$s”>%3$s</ul>’,
    ‘container’ => false,
    ‘fallback_cb’ => ‘FLTheme::nav_menu_fallback’
    ) );
    }
    }

    }`

    #257226

    I’m trying to develop a color scheme where the pages of each major menu section have a different heading background color. That’s easy enough: I’ve created css classes to color the different page headers which I enter into each appropriate block.

    Where I’m struggling is that I’d like the main header menu to show the same colors for active/hover menu items at the top level, and on dropdown items for the child items. I’ve got most of it working. Here’s an example from the “Support” section:

    /*Recolors dropdown menus to match color scheme: working */
    .sf-dropdown.menu-item.menu-item-has-children.menu-item-48.menu-item.menu-support li {
    background: #235789;
    color: #FFFFFF;
    }

    /*Main Menu active and hover: not working*/
    li.current-menu-item.current_page_item.menu-item-has-children.menu-item-48 span {
    background: #235789;
    color: #FFFFFF;
    }

    As you can see in the image, it’s almost working. The color I’m trying to match is the horizontal blue bar. The dropdown menus are behaving the way I want. But for the top level menu item, the best I’ve been able to do is change the background color for the text (span). I haven’t been able to figure out how to specify the entire red box (red is the theme-level active/hover color which I’m trying to override).

    Thoughts?

    Michael

    #257120

    Hi Hannah,

    We usually develop a dynamic shortcode and apply it for this purpose so that the side menu is dynamically displaying the child items based on the page I thought there may be some sort of feature like this in the theme as it’s quite common to want a page specific side menu, this would be a great widget to include with the theme. 🙂

    I have a couple of questions please.

    Regarding the menu locations, there are locations “third” and “fourth” but I’m a little unsure where they display or how to get them to display. Can you please advise?

    Does the theme provide any styling options for side column widgets?

    Thanks

    #257105

    Hey,
    I suggest using Kadence Blocks and the Post Grid/Carousel Block, the plugin is included in your theme package.

    If you want to custom function you can use this in a child theme or snippets plugin:

    
    function my_custom_init() {
    	remove_action( 'virtue_post_grid_excerpt_header' , 'virtue_post_grid_header_meta', 20 );
    	remove_action( 'virtue_post_grid_small_excerpt_header', 'virtue_post_grid_header_meta', 20 );
    	add_action( 'virtue_post_grid_small_excerpt_header', 'my_custom_meta_tooltip_subhead', 25 );
    	add_action( 'virtue_post_grid_excerpt_header', 'my_custom_meta_tooltip_subhead', 25 );
    	function my_custom_meta_tooltip_subhead() {
    		echo '<div class="my_custom_meta_date">';
    		    echo '<span class="updated kt_bold_date" itemprop="datePublished"><span class="postday">'.get_the_date('F j, Y').'</span></span>';
    		echo '</div>';    
    	}
    }
    add_action('init', 'my_custom_init');

    Ben

    #257103

    Hello,

    If you add a class to the button you should be able to style the button specifically or use inline CSS to style the button. Do keep in mind that this will likely be overwritten if you aren’t using a child theme as well.

    Testing in the browser, I added the class “back” to the button and styled it like so for testing purposes:

    button.back {
        margin: 0px 9px;
        height: 100%;
        font-size: 12px;
        text-transform: uppercase;
        background: #4a4a4a;
        border: none;
        color: white;
        position: absolute;
        text-align: center;
    }

    Let me know if that works for you or if you have any other questions.

    Thanks!

    Chris

    #257066

    Hi,

    Is it possible to export Kadence theme settings from parent theme and then import them into a Kadence theme child?

    Thanks

    #257019

    Hey,
    So there isn’t an option for this, you could create a child theme and edit how this works in the code.

    Another option would be to add this css, it won’t prevent it from being clickable but it will make it look like it’s not based on the mouse:

    .single-article article .postfeat a {
        pointer-events: none;
        cursor: default;
    }

    I hope that helps!

    Ben

    #257011

    Any update on this @britner? I’m desperate to create a child theme, but need to move the Customizer settings across

    #256892

    Hello,
    i have a post-grid that shows the date as calendar icon in the head of the excerpt. Is it possible to show the full date as numbers instead the icon?
    I use a child-theme and i found this post with some php-code to add at functions.php but it doesn´t show any affect.

    Can you please help me with that problem?
    greets Jan

    #256708

    Over the past several months I have noticed that most (maybe all) of our sites using Kadence themes don’t show the API license any longer. Somehow, they seems to have all become disconnected from our paid account. So, for instance, right now I’m working on a little used site whose Ascend theme needs to be updated, but I can’t simply click “update” because it’s no longer connected as a paid license, despite now having a lifetime license. I’m using a child theme, but I want to update the parent theme but am not sure how to do this since the current, outdated theme will no longer accept my license info. If I simply download the latest version of the theme on its own rather than being able to do an update from within the site, won’t it be like starting over? Any customizations will be lost, right? I don’t know why all of these paid themes don’t know they are still paid. Less than happy about having to re-connect around eight websites as our subscription has never lapsed.

    #256599

    On the right track, only thing is plugins_url( 'kblocksextend.js', __FILE__ ), isn’t right if you are using a child theme. So should be:

    get_stylesheet_directory_uri() . '/kblocksextend.js'

    meaning:

    function kblocksextend_enqueue() {
        wp_enqueue_script(
            'kblocksextend-script',
           get_stylesheet_directory_uri() . '/kblocksextend.js',
            array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ),
            filemtime( plugin_dir_path( __FILE__ ) . 'kblocksextend.js' )
        );
    }
    add_action( 'enqueue_block_editor_assets', 'kblocksextend_enqueue' );

    Ben

    #256562

    Thanks Ben.

    I’m reluctant to use the word ‘Master’ but I’m fairly proficient at tinkering. This is my first time digging into Gutenberg blocks though so please excuse my ignorance.

    What I have done is to add this to the child theme’s functions.php file:

    function kblocksextend_enqueue() {
        wp_enqueue_script(
            'kblocksextend-script',
            plugins_url( 'kblocksextend.js', __FILE__ ),
            array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ),
            filemtime( plugin_dir_path( __FILE__ ) . 'kblocksextend.js' )
        );
    }
    add_action( 'enqueue_block_editor_assets', 'kblocksextend_enqueue' );

    And then created the kblocksextend.js file in the same directory as functions.php.

    The kblocksextend.js file is as follows:

    function example_add_to_prebuilt( options ) {
    	const blockOptions = [
               {
    		key: 'forum_blocks',
    		name: 'Forum Blocks',
    		keywords: [  'forum', 'business' ],
    		pro: false,
    		pages: 1,
    		by: 'LV',
    		byLink: 'https://mysite.com/',
    		category: [ 'agency', 'business' ],
    		image: 'URL TO IMAGE HERE',
    		templates: [
    			{
    				key: 'forum_hero_section',
    				pro: false,
    				content: '{"__file"...JSON-block-export-content-here"}',
    				name: 'Forum Hero Section',
    				image: 'https://imagesource.png',
    			}
                      ],
                 },
    	];
    	const newOptions = options.concat( blockOptions );
    	return newOptions;
    }
    wp.hooks.addFilter( 'kadence.prebuilt_templates_array', 'example/prebuilt', example_add_to_prebuilt );

    Any chance you could point me in the right direction from here or let me know what I have misunderstood?

    Also, where do I add this bit?

    That needs to be enqueued on the https://developer.wordpress.org/reference/hooks/enqueue_block_assets/ action

    Thanks for your time and apologies for the noob levels happening! 🙂

    If I can figure this out I will create a video tutorial for it and upload it to my YouTube channel 😀

    • This reply was modified 5 years, 8 months ago by Shane Rielly.
    • This reply was modified 5 years, 8 months ago by Shane Rielly. Reason: Spelling error
    • This reply was modified 5 years, 8 months ago by Shane Rielly.
    #256541

    Hey,
    Just want to make sure I am clear for everyone, this is not a basic thing where you simply copy and paste. You should only do this if you consider yourself a developer or a master tinkerer. In the future, I will be building an interface for this for the average user. For now you would need to use something like page builder cloud to have an interface.

    Do I need to create a .js file

    Yes, you need to create a custom js file that would be in your child theme or a custom plugin. That needs to be enqueued on the https://developer.wordpress.org/reference/hooks/enqueue_block_assets/ action.

    I hope that helps!

    Ben

    In forum: Pinnacle Theme

    In reply to: WooZone Problem

    #256297
    This reply has been marked as private.
    In forum: Pinnacle Theme

    In reply to: WooZone Problem

    #256289

    Can you tell me what you’ve added to your child theme?

    Thanks!
    Hannah

    #256121

    Hi Michael,

    For single posts:

    You need to override /wp-content/themes/kadence/template-parts/title/meta.php in your child theme as, for example, /wp-content/themes/kadence-child/template-parts/title/meta.php and replace

    echo $author_string;

    with

    do_action( 'pp_multiple_authors_show_author_box', false, 'inline' );.

    Source: template-parts/content/entry_header.php > inc/template-hooks.php > inc/template-functions/title-functions.php > inc/components/entry_title/component.php > template-parts/title/meta.php.

    For archives:

    The file to override is /wp-content/themes/kadence/template-parts/content/entry_loop_meta.php.

    #255953

    Hey,
    I don’t suggest changing files if you just need to change the widths of the area you can do that with CSS without editing any files. For example:

    @media (min-width: 992px){
        .kad-header-right {width:75%}
        .kad-header-left {width:25%}
    }

    You can adjust the percentages to match what you need and place in the custom css area of your site.

    If you want to change the file in your child theme you would override the templates/header.php line 21.

    Ben

    In forum: Ascend Theme

    In reply to: Video shortcodes

    #255878

    Hi Ben,

    It seems I’m using Ascend Premium Child 1.0

    I thought I was suing the main theme not a child theme – do you know why this might have happened?

    Thanks,
    Matt

    #255736

    Hi Chris,

    The site itself has Transparent Header options turned on in theme options and none of the pages show a transparent header.

    This page https://tatum.wordpresspreview.net/about-us/ does have transparent working but only because I went to the page and changed it’s setting from “default” to “true”.

    The Site is on a staging/dev environment and I currently have all plugin disabled and running a child theme.

    I will send a follow up login message.

    #255699

    So there isn’t a simple way to achieve this. It would require some extra javascript and custom code added through a child theme. If there’s another style you’re wanting I would be happy to help you achieve it! Let me know.

    Best,
    Hannah

Viewing 20 results - 581 through 600 (of 6,404 total)