Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter nwp_developer

    (@nwp_developer)

    Solved. There’s a priority setting for the control array.

    Thread Starter nwp_developer

    (@nwp_developer)

    Thanks bcworkz

    Thread Starter nwp_developer

    (@nwp_developer)

    Yes

    Forum: Hacks
    In reply to: Dynamic Class Sidebar
    Thread Starter nwp_developer

    (@nwp_developer)

    On a related note how do you make $wp_customize->add_control show on refresh of another control selection? I can create an if statement that tests if the value is select in the top control to show the bottom control. However, it only updates when physically refreshing the page and not when the theme customizer refreshes the changes for preview.

    Thread Starter nwp_developer

    (@nwp_developer)

    Hi Adam.
    Thanks for the update. I think the reason why the adding new shortcodes only works intermittently is because the shortcodes are not being updated regularly when wr_pagebuilder is launched.

    Is there a way to reload the shortcodes without having to uninstall or deactivate the plugin? It doesn’t look like the option _wp_pb_reload_shortcodes is working when set to true.

    If not can you point me in the right direction to modify this?

    Cheers

    Forum: Hacks
    In reply to: Pass $name to get_header()
    Thread Starter nwp_developer

    (@nwp_developer)

    Great! So you can create a Theme customization for the header using $wp_customize in functions.php, instantiate the WP_Customize_Control with type select to select your setting id for the header and pass the setting id of the header to your filter.

    Forum: Hacks
    In reply to: Pass $name to get_header()
    Thread Starter nwp_developer

    (@nwp_developer)

    Thanks!
    To clarify for anyone else:
    apply_filters allows you to create your own custom filters.

    In apply_filters(‘my_header_filter’, ”):
    my_header_filter is your custom filter and the ” is the value you’re filtering.

    So you can use <?php get_header( apply_filters(‘my_header_filter’, ”) ); ?> to dynamically change your header in your index or frontpage file.

    Then in functions.php you can change the value of the header
    function change_header($header){
    $header=’second’;
    return $header;
    }

    add_filter(‘my_header_filter’, ‘change_header’);

    To filter get_header() to load get_header(‘second’) to load header-second.php.

    Now the question is how to get this into $wp_customize.

Viewing 7 replies - 1 through 7 (of 7 total)