I have WordPress setup on primary domain, how do I set it up on its subdomain using the same database?
Change the $table_prefix in the wp-config.php file.
Change the $table_prefix in the wp-config.php file.
But all of them get obtained from the database. The problem is that you’re ignoring half of them. Or rather merging two of them and displaying as one. Let’s take a look at your code: while ( $query->have_posts() ) { $query->the_post(); // <- here you call the_post() first time $output.='<div class=”entry filter_product”>’; // and in … Read more
Possible solution I think a part of your issue is the \WP_Query call – querying the database isn’t “cheap” with regards to making fast, efficient AJAX calls, but you also can’t really avoid it in your situation. One approach you could take would be caching the results of the query for some amount of time, … Read more
Change menu_type to submenu. 😉
Because you asked “How to Code”, here is my guide to get you started. Create a menu page in the administration area using add_menu_page Create the form using html select form-element Populate the form-element with all pages. To get all pages you can use get_posts() Save the form using admin_post action Save the selected-item of … Read more
Your queries are not the issue, those should be handled without a problem. I can’t say for sure without really digging into this but I would start with optimizing your page. Your thumbnails are like 4-6 MB each. I could optimize these images down to 20K without losing quality. The initial page load takes 22 … Read more
If found out that this is removing my menu: function add_menu_icon ( $items, $args ) { if ( $args->theme_location == ‘primary’ ) { $elements=”<li class=”custom-logo”>” . get_custom_logo() . ‘</li>’; $elements .= $items; $items = $elements; return $items; } } add_filter( ‘wp_nav_menu_items’, ‘add_menu_icon’, 10, 2 ); I still haven’t figured out why.
Well, Minit for WordPress is hooked into the plugins_loaded action hook (you can see that checking the file minit.php). And the thing is you are requiring the file minit.php in your functions.php, which is a file loaded after the hook plugins_loaded is called. This means that Minit is not being initialized the proper way. So, … Read more
Case 1 – is_rtl() is not working because it has been called directly. To use such contditional tags in WordPress, query should already be run. So such function should be used inside the function hooked to appropriate hook. Since it is called directly, its value will be always false. See https://developer.wordpress.org/themes/basics/conditional-tags/#where-to-use-conditional-tags Case 2 – It … Read more
You’ll need to echo back your results in PHP. foreach($category_detail as $cd){ echo $cd->cat_name; } Also you might want to consider putting something between each category. If you have categories/terms like Blue, Red, Green. Then how you are currently looping over them, it will print it back as: data-category=”BlueRedGreen” Hope that helps!!