Why WordPress gets old templates code instead of the last updated ones
Why WordPress gets old templates code instead of the last updated ones
Why WordPress gets old templates code instead of the last updated ones
I answered my own question. I had the defaults set in the customizer settings, but not in the get_theme_mod() function.
Search form to find custom meta box generated data
Primary Menu Showing All Pages With No Sub-Nav
looks like your navigation can be found in this function: sixteen_content_nav() I just guess, but have a look into this file: inc/template-tags.php
You should be able to just use the default get_next_post_link with $in_same_term set to true. Have you tried that? Instead of your <?php next_post_link( ‘<div class=”nav-next”>%link</div>’, ‘%title <span class=”meta-nav”>’ . _x( ‘→’, ‘Next post link’, ‘sixteen’ ) . ‘</span>’ ); ?> try this <?php next_post_link ( ‘%link →’, ‘%title’, true, ”, ‘category’ ); ?>
add_action( ‘admin_footer’, ‘my_action_javascript’ ); // Write our JS below here function my_action_javascript() global $wpdb; $pageposts = $wpdb->get_var(“SELECT max(menu_order) FROM $wpdb->posts WHERE post_status=”publish” AND post_type=”post_trainers””); ?> <script type=”text/javascript” > jQuery(document).ready(function($) { var data = { ‘action’: ‘my_action’, ‘whatever’: <?=$pageposts?> }; $.post(ajaxurl, data, function(response) { if($(‘#menu_order’).val()==” || $(‘#menu_order’).val()==’0′) $(‘#menu_order’).val(response); }); }); </script> <?php } add_action( ‘wp_ajax_my_action’, ‘my_action_callback’ … Read more
You could for example change <?php next_post_link ( ‘%link →’, ‘%title’, true, ”, ‘category’ ); ?> to <?php next_post_link ( ‘<div style=”float: right”>%link →</div>’, ‘%title’, true, ”, ‘category’ ); ?>
Did a bit more digging and it appears to have been a conflict in my theme: add_filter( ‘post_thumbnail_html’, ‘remove_width_attribute’, 10 ); add_filter( ‘image_send_to_editor’, ‘remove_width_attribute’, 10 ); function remove_width_attribute( $html ) { $html = preg_replace( ‘/(width|height)=”\d*”\s/’, “”, $html ); return $html; }
You can modify a lot of form behavior by passing $args to the comment_form() function – have you tried that? Alternatively, you can write a custom comments template file and then use the comments_template() call to display it within the theme. This method would allow you to have complete control of the type, class, and … Read more