nwp_developer
Forum Replies Created
-
Forum: Hacks
In reply to: Theme Customizer Menu Item OrderSolved. There’s a priority setting for the control array.
Forum: Hacks
In reply to: Wp_customize_image_control Use Add MediaThanks bcworkz
Forum: Plugins
In reply to: [Page Builder by WooRockets.com] Pagebuilder Element WidgetYes
Forum: Hacks
In reply to: Dynamic Class SidebarOn 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.
Forum: Plugins
In reply to: [Page Builder by WooRockets.com] Adding shortcodesHi 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()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()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.