Unanswered Questions
1,966 questions with no upvoted or accepted answers
7
votes
1
answer
2k
views
Registering menu with 'Automatically add new top-level pages to this menu' selected
Is it possible to register a menu inside of a theme functions file and have 'Automatically add new top-level pages to this menu' pre-selected? I can't find any info about this in the ...
6
votes
2
answers
661
views
Link to Author archive from Navigation Menus in dashboard?
I'd like to display a grid of authors on my site showing the name of the author and their avatar. The tricky part is, I'd like to be able to control this from the Menus page in the dashboard so I have ...
6
votes
2
answers
2k
views
Admin Area Custom Type Search By Meta Fields Without Title & Content
I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code:
...
5
votes
0
answers
2k
views
How to allow users login to WP from external domain and make REST requests
Basically what i want to do is:
Use Wordpress as a login system and data storage for web-application on another domain.
Make users able to register and perform REST calls from the application.
Let ...
4
votes
1
answer
5k
views
AJAX handler throws 400 (Bad request) - why?
I am trying to apply a "Load more posts" function to a post loop, but I am dealing with a 400 Bad request, when admin-ajax.php is referred to.
The reference I used is this - https://rudrastyh.com/...
4
votes
0
answers
759
views
wp-admin remove the subfolder URL
I have a problem with WP. I have a website with this URL: http://sub.domain.com/subfolder My Website works fine, but when I connect on wp-admin, the subfolder URL disappeared (http://sub.domain.com/wp-...
3
votes
1
answer
2k
views
Trying to add admin file upload form plugin
I'm trying to create an upload form from my admin page via a plugin.
I've cobbled together some code from a few sources, including this one:
https://www.htmlgoodies.com/beyond/cms/create-a-file-...
3
votes
1
answer
2k
views
Too many datadabse connections - upper ceiling mysql
We run a high traffic blog with around 500 real-time users and 10000 posts.
We are hosted by self on VPS - 16gb, 4 core with separate mysql DB server - 4gb, 2 core; both SSD.
No problem with hosting ...
3
votes
0
answers
1k
views
Add Product categories to Wordpress menu without losing hierarchy
I need to add product categories to Wordpress menu, but when I'm doing this with WP interface it lose the hierarchy
I tried with WP-CLI, but there is no method to specify wich item is the child.
...
3
votes
0
answers
2k
views
Searchable meta value in user.php
I have created a new column in the user table list (admin page) and would like the column to be searchable in the search query, How do i add the meta to the search users query ?
/**
* Create user ...
3
votes
1
answer
573
views
Replacing the NavWalker dropdown element
I'm creating a website for my school with Material Design for Bootstrap and the NavWalker is giving me some issues, I want to change the element of dropdown i.e. from ul to div. I've tried to edit the ...
3
votes
1
answer
2k
views
How to Use JSON With AJAX?
I've defined a PHP callback function to handle the communication between server-side and client-side:
function json_render_modal_body() {
check_ajax_referer( THEME_PREFIX . '-modals', 'nonce' );
...
3
votes
1
answer
793
views
Add Menu items description via Custom Walker for wp_nav_menu()?
Here is a solution I've found, and it works to append a description after the link.
My question is: Is it also possible to append a description before the link?
function add_description_to_menu($...
3
votes
0
answers
65
views
Render Selected Categories in Admin Edit Post Screen differently
Selected Categories for a post in the admin screen are rendered by:
// Put checked cats on top
$output .= call_user_func_array( array( $walker, 'walk' ),
array( $checked_categories, 0, $args ) );
...
3
votes
1
answer
2k
views
Add div to specific sub-menu
I researched in google, yandex but had no success.
With this code I can set a div to sub-menu but this code add to all sub-menus, I just need to add div to specific sub-menu.
class Megratron_div ...