Foundation Scripts not loading (custom theme)

Benoti Yes, that was it! Seems app.js needs to be the last item loaded. Here is the final function with a couple of changes for anyone interested: function foundation_scripts() { wp_deregister_script(‘jquery’); wp_register_script(‘jquery’, get_template_directory_uri().’/js/vendor/jquery.js’, false); wp_enqueue_script(‘jquery’); wp_enqueue_script(‘foundation-js’, get_template_directory_uri().’/js/vendor/foundation.js’, array(‘jquery’), false, true); wp_enqueue_script(‘what-input’, get_template_directory_uri().’/js/vendor/what-input.js’, false, true); wp_enqueue_script(‘app’, get_template_directory_uri().’/js/app.js’, array(‘jquery’, ‘foundation-js’), false, true); }

Responsive Dropdown Menu

Ok… So, after some poking around, I got something to work. I basically combined the menu I found here: https://webdesignerhut.com/css-dropdown-menu/ with the responsiveness of my original menu. The final code looks like… The JavaScript: <script> /* Toggle between adding and removing the “responsive” class to topnav when the user clicks on the icon */ function … Read more

custom browse by

In your tag code you are missing a few quotes chars, the $tag var, and you cant endforeach like that i add braces for it: <div class=”tag-cloud” style=”margin: 20px 0;”> <?php echo ‘<select class=”tags”>’; // Add custom option as default echo ‘<option>’ . __(‘Select Tag’, ‘text-domain’) . ‘</option>’; // Get categories as array $tags = … Read more

PHP drop down menu for my get_category child of

You can use the function wp_dropdown_categories() instead of wp_list_categories(), if you dont need to use the list function. wp_dropdown_categories() seems to be working just like the list function. So first just try and replace these two functions. $terms = wp_dropdown_categories( array( … Read about it in the codex here.

How to use wp_dropdown_pages or wp_list_pages to accomplish a menu like this?

Here’s an easy way to generate a dropdown menu from your blog pages using the WordPress wp_dropdown_pages() function. Adding a bit of javascript you can send the user to the page when they select it <section id=”pageselect”> <span> <?php wp_dropdown_pages(‘show_option_none=Explore…’); ?> </span> <script type=”text/javascript”><!– var selectmenu = document.getElementById(“page_id”); function onPageChange() { if ( selectmenu.options[selectmenu.selectedIndex].value > … Read more

Changing an item in drop down after 5 latest posts per taxonomy

Have a closer look to the blow code- $query_args = array( ‘posts_per_page’ => ‘5’, ‘orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ); $listedPosts = new WP_Query($query_args); // the loop if ( $listedPosts->have_posts() ) { while ( $listedPosts->have_posts() ) { $listedPosts->the_post(); if ( (int) $listedPosts->current_post == 5 ) { // You need to use ‘==’ or ‘===’ … Read more

How can I create this menu with wp_nav_menu()?

This can achieve with a nav walker. I used this. I am stepping according to the mentioned. Put navwalker (wp-bootstrap-navwalker.php) in your theme root Call to the navwalker in functions.php file. require_once(‘wp-bootstrap-navwalker.php’); Create your menu in WordPress Backend (Appearance -> Menus) In your menu area, according to me in header.php wp_nav_menu( array( ‘menu’ => ‘main_menu’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)