is_page_template wont allow me to enqueue scripts
is_page_template wont allow me to enqueue scripts
is_page_template wont allow me to enqueue scripts
Custom taxonomy not refreshing page on add
The answer is in your question: <?php $index_title = get_post_meta( get_the_ID(), ‘_x_entry_alternate_index_title’, true ) ?>
I figured out how to proceed. I created a text file with the desired select options and just replaced the input field from the template with the bellow code. <?php $file_path=”FILE_PATH_HERE”; // path to the file with select options if ( !file_exists( $file_path ) ) { echo ‘<input type=”text” name=”location” placeholder=”‘ . __(“Location …”, “custom-settings”) … Read more
If all you are doing is setting a cookie on a page then why the complexity? Check this out for a simple answer http://www.w3schools.com/php/func_http_setcookie.asp My only thought is that you are then trying to redirect them back to WordPress and if so you may wish to check this Setting custom cookies in WordPress I’d say … Read more
get_comments not working properly after WordPress v4.4 update
Unless you have a very specific reason, and you know what you are doing, code like this belongs in the functions.php file or a dedicated plugin. WordPress uses two kinds of hooks to allow certain functions to be triggered at specific times. These are called Actions and Filters. https://codex.wordpress.org/Plugin_API Placing code in a file that … Read more
Moving CDN jQuery to footer does not work?
$bodyclasses = get_body_class(); foreach ($bodyclasses as $class) echo $class;
Okay, figured it out! I’ve amended my theme function as follows: add_filter( ‘wp_nav_menu_items’, ‘add_loginout_link’, 10, 2 ); function add_loginout_link( $items, $args ) { if (is_user_logged_in() && $args->theme_location == ‘top_navigation’) { $items .= wp_nav_menu( array(‘menu’ => ‘menu-logged-in’, ‘container’ => ”, ‘echo’ => false, ‘items_wrap’ => ‘%3$s’) ); } elseif (!is_user_logged_in() && $args->theme_location == ‘top_navigation’) { $items … Read more