This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

srumery

Forum Replies Created

Viewing 15 replies - 46 through 60 (of 78 total)
  • Author
    Replies
  • in reply to: Conditionally hide theme options #13870
    srumery
    Participant

    I reviewed the slider plugin and I see the “show-hide-toggle” code in use. It looks just like what I am applying. Since I can’t figure it out, I copied the code to a sandbox site that you can take a look at. How should I send you the login information?

    I hope you can find out what is going on. This execution is really slick and I will have a few uses for it.

    in reply to: Conditionally hide theme options #13865
    srumery
    Participant

    It’s on my local development machine. I’ll push up the code to a sandbox site and in the process, maybe I’ll figure something out.

    I was looking for an example in the framework so I could duplicate it but the code for the Homepage Content selection (for “Posts” or “Custom Layout” selection) looks like it is written a different way. I also checked the Footer columns options from the Layout tab and didn’t see a match there either.

    in reply to: Conditionally hide theme options #13863
    srumery
    Participant

    I’m picking up what you’re laying down but I’m not able to get the receiver option to trigger. The option with the new 'class' => 'hide receiver receiver-menu_style_1' is being hidden no matter what the option setting is in the trigger field.

    I have tried wrapping the subgroup_start array to include the trigger option (set it just before) as well as excluding it (adding it after) and the results are the same. The second option doesn’t trigger. Does the array for the subgroup_start go before the trigger option array?

    array(
    		'type' => 'subgroup_start',
    		'class' => 'show-hide-toggle'
    	),

    Here is the code I am using:

    array(
    		'type' => 'subgroup_start',
    		'class' => 'show-hide-toggle'
    	),
    	array(
    		'name'      => 'Main Menu Style',
    		'desc'      => 'Select a style for the main menu bar.',
    		'id'        => 'main_menu_style',
    		'std'       => 'menu_style_1',
    		'type'      => 'select',
    		'options'   => array(
    			'menu_style_1'	=> 'Standard - No changes applied',
    			'menu_style_2'	=> 'Modern - flat and boxy'
    		),
    		'class'		=> 'trigger'
    	),
    	array(
    		'name'      => 'Menu Border Color',
    		'desc'      => 'Select a background color for the menu items',
    		'id'        => 'main_menu_border_color',
    		'std'       => '',
    		'type'      => 'color',
    		'class'		=> 'hide receiver receiver-menu_style_1'
    	),
    	array(
    		'type' => 'subgroup_end'
    	),

    In this example, I am expecting the main_menu_border_color option to show when the menu_style_1 is selected in the main_menu_style option and hide when the menu_style_2 is selected.

    What am I doing wrong here?

    in reply to: Conditionally hide theme options #13861
    srumery
    Participant

    I have a theme option tab called “Styles” and a new section of options that stores the menu style as well as three fields to store color values. Here are two fields from the section:

    array(
    		'name'      => 'Main Menu Style',
    		'desc'      => 'Select a style for the main menu bar.',
    		'id'        => 'main_menu_style',
    		'std'       => 'menu_style_1',
    		'type'      => 'select',
    		'options'   => array(
    			'menu_style_1'	=> 'Standard',
    			'menu_style_2'	=> 'Modern'
    		)
    	),
    	array(
    		'name'      => 'Background Color',
    		'desc'      => 'Select a background color for the menu items',
    		'id'        => 'main_menu_background_color',
    		'std'       => '',
    		'type'      => 'color'
    	)

    Using just these two fields in this example, I would like to hide the field with the ‘id’ => ‘main_menu_background_color’ if the option from ‘id’ => ‘main_menu_style’ is set to ‘menu_style_1’. This is similar to what you are doing with the Homepage Content radio button selection for “Posts” or “Custom Layout”.

    in reply to: Switching Template Parts in Search Results #13421
    srumery
    Participant

    Brilliant! This worked perfectly. Thank you so much.

    in reply to: Executing shortcodes in Builder elements #13404
    srumery
    Participant

    Hi Jason,

    Actually, I created a custom builder element that displays text on top of a full width background image. The text comes from a textarea I setup in the element and that’s where I would like to use shortcodes. The button shortcode I added doesn’t fire there. I think I saw a post about this some time ago but I can’t find it now.

    The custom builder element has a unique ID ($element_id = 'rum_landing_page_intro_section';) when added to the theme by using themeblvd_add_builder_element.

    I have reviewed the Layout Builder (API) documentation and I don’t see anything referencing shortcode support.

    Is there a way to make sure shortcodes are executed in my custom builder element?

    in reply to: Error calling themeblvd_add_builder_element #11497
    srumery
    Participant

    I’ve got it all wrapped in a nice little plugin now. Brilliant!

    Thank you, Jason.

    in reply to: Error calling themeblvd_add_builder_element #11483
    srumery
    Participant

    Ha! Your post beat mine by 12 seconds. Thank you for your guidance and attention to detail. I love this framework!!

    Onward!

    in reply to: Error calling themeblvd_add_builder_element #11482
    srumery
    Participant

    UPDATE: I added the code to an include file that is called from the child theme functions.php AFTER the call to the framework and it worked! This is great, thank you! 🙂

    I would prefer this functionality be set in a plugin to make it more portable for other child themes. Can I call my custom builder function from the after_setup_theme hook like your other plugins similar to this?

    add_action( 'after_setup_theme', 'themeblvd_favicon_init' );
    in reply to: Error calling themeblvd_add_builder_element #11478
    srumery
    Participant

    I was putting it in a plugin so that I could use it across a few child themes. That was the intent but that approach may be causing the problem. I’ll add the code as an include file in one of my child themes for now.

    If I am able to it as a plugin, what can I wrap around my code so it gets fired off at the right time?

    in reply to: Remove meta boxes for Pages and Posts #9373
    srumery
    Participant

    Got it. Now I understand. Thank you.

    To remove the meta data on the post, I am using a template part and manually removing the call to themeblvd_blog_meta();. It would be really slick to remove/alter this content with a filter like you do for template parts.

    After a little digging…

    Hey, if themeblvd_blog_meta() is an action hook, can’t I conditionally modify the output?

    // alter the metadata that is returned at the top of the post
    function rum_alter_post_metadata() {
        // if the post type is SERVICES, don't display any metadata at the top of the post
        if ( 'services' == get_post_type() ) {
            // return an empty string -or- don't echo anything
        }
    }
    add_action( 'themeblvd_blog_meta', 'rum_alter_post_metadata' );

    Is there a better way to do this?

    I also have noticed that if I use a custom post type with a taxonomy, the category field in the metadata output is blank. I could adjust the output to account for that using this method as well, right?

    srumery
    Participant

    Just like you said… it’ll be working after the next update. I have it implemented and it’s working great.

    Thank you!

    in reply to: modifying priority for child theme stylesheets #8088
    srumery
    Participant

    You are exactly right. I was confusing the two. I applied your fix and everything is lining up properly.

    Thank you!

    in reply to: Override sidebar layout using an API #7686
    srumery
    Participant

    That’s exactly what I was looking for. Thank you for pointing it out. I applied this condition and it worked perfectly:

    if( 'sc_event' == get_post_type() )
    in reply to: Form fields are being stripped out #7548
    srumery
    Participant

    Thank you for the response. I have been working with JumpStart quite a bit and hadn’t seen that yet so I wanted to eliminate it.

Viewing 15 replies - 46 through 60 (of 78 total)