Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter fromthe80s

    (@fromthe80s)

    @jcastaneda this is not a plugin or paid theme, no one to reach out to. Custom code from an inherited site.

    @mkarimzada Yes very helpful. The last comment in the 2nd link, implies that I can drop the null without implications.

    This should be true for my initial code example as $content is echoed to the page.

    I have several other shortcodes with ($atts, $content = null, $shortcode_tag) where $content is not used in the function. Are there implications to drop the null in these cases?

    • This reply was modified 4 years, 4 months ago by fromthe80s.
    • This reply was modified 4 years, 4 months ago by fromthe80s.
    Thread Starter fromthe80s

    (@fromthe80s)

    I agree 100% with your initial disclaimer and appreciated the code examples. I needed to migrate a page quickly while practicing a bit of PHP and this will do. Many Thanks!

    Thread Starter fromthe80s

    (@fromthe80s)

    Actually this is what I what to achieve with the menu navs rather.

    In site-nav.php:

    <?php
      if ( is_page(3)) :
        wp_nav_menu([
          'theme_location'  => 'auto',
          'menu_class'      => 'navbar-nav nav'
          'container_class' => 'navbar navbar-s-page'
        ]);
      elsif ( is_page( array[1, 4])) :
        wp_nav_menu([
          'theme_location'  => 'motorcycle',
          'menu_class'      => 'navbar-nav nav'
          'container_class' => 'navbar navbar-s-page'
        ]);
      else :
        wp_nav_menu([
          'theme_location'  => 'primary',
          'menu_class'      => 'navbar-nav nav'
          'container_class' => 'navbar navbar-s-page'
        ]);
      endif;
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)