About Travis Smith

As a WordPress Enthusiast, Travis writes about his journey in WordPress trying to help other WordPress travelers and enthusiasts with tutorials, explanations, & demonstrations of the things he learns.

Comments

  1. Hi Travis,
    Very nice explanation. Never thought about manually activating the menu only for the CPT:

    // Enable the secondary navigation menu for single post type
    add_filter(‘genesis_options’, ‘wps_define_genesis_setting’ , 10, 2);
    function wps_define_genesis_setting( $options, $setting ) {
    if( $setting == GENESIS_SETTINGS_FIELD ) {
    $options['subnav'] = 1;
    }
    return $options;

    Very nice write up!
    }

  2. I’m using Part B of this tutorial to create a third menu to the WordPress Menu System to work in conjunction with the two already there. What call do I use to actually display it like the other two in Genesis?

  3. Excellent Tutorial,
    If the mounting brake field is left empty in the backend, How can I get it to not display the Mounting Brake: on the frontend. Hopes this makes since..

    Thanks

    Mike

    • Hello Mike,

      To dynamically hide fields, you would modify the output like this (modifying lines 26-30):

      <?php
      if ( genesis_get_custom_field( '_wps_part_number' ) )
      	echo "<li><span class='feature-title'>Part Number:</span> <span class='feature'>" . genesis_get_custom_field( '_wps_part_number' ) . "</span></li>";
      if ( genesis_get_custom_field( '_wps_rotor' ) )
      	echo "<li><span class='feature-title'>Rotor:</span> <span class='feature'>" . genesis_get_custom_field( '_wps_rotor' ) . "</span></li>";
      if ( genesis_get_custom_field( '_wps_caliper' ) )
      	echo "<li><span class='feature-title'>Caliper:</span> <span class='feature'>" . genesis_get_custom_field( '_wps_caliper' ) . "</span></li>";
      if ( genesis_get_custom_field( '_wps_mounting_bracket' ) )
      	echo "<li><span class='feature-title'>Mounting Brake:</span> <span class='feature'>" . genesis_get_custom_field( '_wps_mounting_bracket' ) . "</span></li>";
      if ( genesis_get_custom_field( '_wps_weight_per_axle_set' ) )
      	echo "<li><span class='feature-title'>Weight/Axle Set:</span> <span class='feature'>" . genesis_get_custom_field( '_wps_weight_per_axle_set' ) . "</span></li>";
      
  4. I’m confused about how you started out as single-wps_discbrakes.php and then ended up with single-wps_axlesizes.php in the finished product.

Leave a Reply

%d bloggers like this: