Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 137402

Usually, plugin and theme authors need to provide access to a settings (options) screen so users can customize how the plugin or theme is used. The best way to present the user with such a screen is to create an administration menu item that allows the user to access that settings screen from all the Administration Screens.

0 votes
Accepted

How to sort by two meta keys in admin area?

I can't find any examples that combine the $query->set('property', 'value') syntax with an array assuming that's the correct method In your $args array, you defined both meta_query and orderby as ar …
Sally CJ's user avatar
  • 39.9k
3 votes
Accepted

Visiting a console submenu page does not expand its parent menu item

You can use the parent_file hook to ensure the TDLRM menu is expanded when viewing the "Store users" or "Categories" page. add_filter( 'parent_file', 'wpse_398962_parent_file' ); function wpse_398962_ …
Sally CJ's user avatar
  • 39.9k
1 vote
Accepted

Show admin menu and toolbar in admin post page

What you see on that image is the full-screen mode which is the default mode in the block editor (that applies to Pages, Posts and custom post types), and which is intended to help users to work witho …
Sally CJ's user avatar
  • 39.9k
1 vote
Accepted

Wordpress add page under admin submenu and retaining the active status of the parent submenu...

If I understand it correctly — you want the "Plans" sub-menu to be highlighted when on the "Add/edit plans" (pxmag-plans-edit) page, then you can do it like so: Use the add_menu_classes hook to highl …
Sally CJ's user avatar
  • 39.9k
0 votes
Accepted

require/include php file in add_menu()

You can turn on output buffering, include (and evaluate) the PHP file, and save the output (of the evaluated code) in a variable, like so: ob_start(); include 'docs/row_layouts.php'; $html = ob_get_c …
Sally CJ's user avatar
  • 39.9k
0 votes
Accepted

How to allow suscriber to access specific pages in dashboard?

First off, you can add a menu (or an admin) page using: add_menu_page() to add a top-level menu page add_submenu_page() to add a submenu page And there are also helper/wrapper functions you can us …
Sally CJ's user avatar
  • 39.9k
1 vote
Accepted

Getting post attchment URL to populate a CPT Admin Page Column

The File field's documentation has some options you can try, but here's an example if your field's Return Value is array, where you can use $gradingForm['url'] to get the attachment URL: $gradingForm …
Sally CJ's user avatar
  • 39.9k
2 votes
Accepted

load-{$page hook} and returned parameter

//is there a $param here? None, the hook you're using does not pass any parameters to the callback. But you can instead use the admin_enqueue_scripts hook which passes the hook name for the curr …
Sally CJ's user avatar
  • 39.9k
2 votes

Admin submenu issue with PHP not detecting two strings as equal

string(77) "edit-tags.php?taxonomy=acs-field-group-category&post_type=acs-field-group" string(73) "edit-tags.php?taxonomy=acs-field-group-category&post_type=acs-field-group" Same string, different l …
Sally CJ's user avatar
  • 39.9k
3 votes
Accepted

show badge with count for pending items in custom post type

There's indeed a WordPress function for counting posts: wp_count_posts(). So you can do something like: $memo_count = wp_count_posts( 'memo' )->pending;
Sally CJ's user avatar
  • 39.9k
12 votes
Accepted

Custom WP_List_Table displays blank rows

You're getting the blank rows because your column headers are registered late. And you should register the headers (i.e. initialize the list table class instance) before admin notices are rendered on …
Sally CJ's user avatar
  • 39.9k
1 vote
Accepted

Why WP_Screeen doesn't show all options with admin_body_class

But parent_base is set to null. Yes, because by the time admin_body_class is fired, WordPress hasn't yet set the parent_base value. And it's only set after the <body> tag is actually outputted. More …
Sally CJ's user avatar
  • 39.9k
1 vote
Accepted

How to add query args to links to CPT admin submenu

From your question: I've tried it both with and without the esc_url wrapper, but either way, it ends up moving the existing page query arg to the end, and prepending it with #038; instead of the ampe …
Sally CJ's user avatar
  • 39.9k
4 votes
Accepted

Add custom admin menu item for pages using a certain template

If this is what you want: ... you can do it like so: Step #1: Add the custom menu item (Retailer Sendout). function add_retailer_sendout_admin_menu() { $slug = 'edit.php?post_type=page&templa …
Sally CJ's user avatar
  • 39.9k
1 vote
Accepted

Change the destination of the URLs in post.php

The post title and inline "Edit" links in the posts list table at wp-admin/edit.php uses get_edit_post_link() which applies a filter hook also named get_edit_post_link, so if (I correctly understood t …
Sally CJ's user avatar
  • 39.9k

15 30 50 per page