New answers tagged admin
0
So you want to allow people to create posts from the front-end? Sure...
In this answer here I explain a very basic way in which you can achieve this very thing, front-end posts to a post type of your choice.
Here is a basic example of what you might include in your template file to do so;
(please see original answer for further details)
<?php
if ( ...
1
Menu items are added to the left hand dashboard menu with a few different functions, depending on where you want it to display. You will probably want to use add_menu_page. The last parameter of this function will determine how far up/down it displays. These are the defaults that you can position your item around:
Positions for Core Menu Items
2 ...
0
Yes, get_template_part() does work on Admin pages. Here is how I tested:
Add this to functions.php theme (or child theme) file:
add_action( 'admin_menu', 'wpse_99662_register_admin_test_page' );
function wpse_99662_register_admin_test_page() {
add_menu_page(
'Admin Test Page',
'Admin Test Page',
'manage_options',
...
0
From inside a comment Loop...
$author_data = get_user_by('login',$comment->comment_author);
if (!empty($author_data)) {
var_dump($author_data->roles);
}
$author_data->roles is an array so you will need to work out what you want to do with that. That is, print them all? Print the highest ranking role?
if ...
1
The "Contributor" role has very little access to anything on the back end but can created posts.
delete_posts
edit_posts
read
http://codex.wordpress.org/Roles_and_Capabilities#Contributor
For comparison, an ordinary "Subscriber" has the last of the three, so "Contributor" has only two extra capabilities.
I am not quite sure what "access ...
1
Try replacing everything from the comment downwards with this. Basically you seemed to have a function in there that wasn't getting called, and you need to add the case "incr_number" test to the woo_supportpress_ticket_custom_columns function:
/*-----------------------------------------------------------------------------------*/
/* Admin columns for post ...
3
When user starts typing something into tag input, JavaScript makes request to admin-ajax.php with action set to ajax-tag-search to receive list of suggestions (if any).
In that file that action is recognized as belonging to core and wp_ajax_tag_search() function is added to dynamically generated wp_ajax_ajax-tag-search hook, which fires almost immediately ...
3
The first menu item typically is the parent item and shares the name with that item, you can however manually update the entry directly in the $submenu variable, like so..
add_action( 'admin_menu', 'jp_create_admin_pages' );
function jp_create_admin_pages() {
global $submenu;
...
1
Have you tried changing the Menu title to 'All Membership Types'?
add_submenu_page(
'members',
'Membership Types',
'All Membership Types',
'manage_options',
'jp_handle_admin_membership_types');
http://codex.wordpress.org/Function_Reference/add_submenu_page
Not sure if it's possible to do it any other way.
I know ...
1
Programming and machines
As machines are "stupid", they need to be programmed. And programming languages don't work like languages spoken by humans as programs/machines as they can't interpret what the human thinks. They need a clear and unique advice what and when to something we order them. If you for e.g. define the function getBlock() twice, the machine ...
2
You can’t. Create a function that loads that file:
function load_admin_page_file()
{
require 'admin-members.php';
}
Then use that function name as callback argument.
In PHP 5.3 you can use a lambda:
add_menu_page(
'Members',
'Members',
'manage_options',
'members',
function() { require 'admin-members.php'; }
);
0
Without changing anything, everything seems OK today. The auto-suggest works and suggests me existing tags when I begin to type a word... I don't know why but maybe there was a problem because I've firstly created this custom taxonomy as hierachical before I decided to change it to non-hierarchical.
0
I think you need to use "global $current_user;" in your function to get the details of $current_user and global $wp_admin_bar; for admin bar.
This is how I managed to get the role of the current user and change the URL from admin depending on role (It doesn't solve your issue, but maybe you find it helpful)
function mytheme_admin_bar_render() {
global ...
0
To get the Feedbacks admin menu with the Jetpack plugin installed
one has to make sure the Contact Form is activated through the Jetpack setup page /wp-admin/admin.php?page=jetpack:
0
s_ha_dum, that was it. The WPMU Membership plugin was breaking it. It was odd because I tried configuring the access levels, but could not get it to work. So I just turned it off :)
0
So I worked it out. It was not the jQuery as such though I have improved that, it was the placement of the call back function. I moved it over to the main plugin file and it worked.
0
Try running this code on the console
jQuery.post(ajaxurl, {action:'cleanlinks_ajax_get_post_data'}, function(response) {
console.log (response);
});
I can see many things wrong about your JavaScript code and that might be the reason.
1
The HTML
echo '<div id="screen-meta-links">';
echo ' <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">';
echo ' <a href="#" id="your-own-button" class="show-settings">Text for your button</a>';
echo ' </div>';
echo '</div>';
echo '<br style="clera:both" />';
echo '<div ...
1
Not sure why this question was dismissed so quickly. It's actually a valid question, and would be really useful to be able to add a button up there, or even edit the content of each screen option.
I know this is an old question, but...
If you want it to just add a button up there that would link somewhere else. You could just add some jQuery to add the ...
3
One problem is that your 'capability_type' parameter 'community' doesn't match your 'capabilities' array values.
From the Codex:
capability_type
(string or array) (optional) The string to use to build the read, edit, and delete capabilities. May be passed as an array to allow for alternative plurals when using this argument as a base to construct ...
0
Or For adding your sites on "My Sites" if you've missed them, then you can add them by go to
Network Admin > Dashboard > All Sites > Edit Your Desired Site > Users (Tab) > Add Existing User > Add your desired existing username and role it as "Admin"
Regards.
0
I use ManageWP for up to 15 sites at the moment and I find it very useful.
Some of the messages are a bit basic and not very informative (eg "Working ....") but it has reduced the amount of time needed to administer a number of sites.
I have also used it to move and clone sites, again it is not a perfect tool but I have used it a number of times ...
Top 50 recent answers are included
