custom field in admin columns

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 types */ /*———————————————————————————–*/ function woo_supportpress_ticket_columns( $old_columns ){ $columns = array( ‘cb’ => ‘<input type=\”checkbox\” … Read more

Admin user roles/permissions

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 to specific plugins” means exactly but I am nearly … Read more

Admin Menu Hack (Left side in Dashboard)

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 … Read more

How to change widget’s form color in admin?

Register/enqueue an admin stylesheet function my_admin_theme_style() { wp_enqueue_style(‘my-admin-theme’, get_template_directory_uri().’/admin-style.css’); } add_action(‘admin_enqueue_scripts’, ‘my_admin_theme_style’); Then add rules of the form #widget-list div[id*=”_archives-“], div[id*=”_archives-“] { background:red; } Consider that proof of concept. I will leave it up to you to target the precise elements you want.

How to remove permalinks links presents in each page of my site?

You can do this in 2 ways: Remove it from HTML source code (harder, but more correct) Find <footer class=”post-meta”> in your theme files, and remove (or comment) it (with contents). You will see something like this in one of your files: <footer class=”post-meta”> … <a href=”https://wordpress.stackexchange.com/questions/105324/…</a> … </footer> Just remove this part of code … Read more

Adding a single text input field to a custom Dashboard widget

You need a set of functions to : process datas sanitize options allow datas to be updated output the form I like to proceed this way. I set also a function to grab datas so I can call them the simpliest way : add_action(‘wp_dashboard_setup’, ‘wpse_106458_add_widget’); function wpse_106458_add_widget() { $title = my_function_get_options(); $title = $title[‘title’]; wp_add_dashboard_widget(‘widget_id’, … Read more

Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?

Use wp_enqueue_script. You assign a name to your js file when enqueued, and it will stop a file from being enqueued multiple times. Right now your JS is simple enough, but as it gets more complex, it’s better to have it outside in it’s on .js file. add_action( ‘wp_enqueue_scripts’, ‘add_my_js’ ); function add_my_js() { wp_enqueue_script( … Read more

WordPress Plugin Admin Tab

Here is something I used: add_action( ‘admin_menu’, ‘manage_poll_menu’ ); function manage_poll_menu() { add_menu_page( ‘Manage Polls’, ‘Polls’, ‘manage_polls_cap’, ‘manage_polls’, ‘my_poll_options’, ” ); add_submenu_page( ‘manage_polls’, ‘Add New’, ‘Add New Poll’, ‘manage_polls_cap’, ‘add_new_poll’, ‘my_poll_options’ ); add_submenu_page( ‘manage_polls’, ‘Poll Sections’, ‘Poll Sections’, ‘manage_polls_cap’, ‘poll_sections’, ‘my_poll_options’ ); add_submenu_page( ‘manage_polls’, ‘Add New Poll Section’, ‘Add New Poll Section’, ‘manage_polls_cap’, ‘add_new_poll_section’, ‘my_poll_options’ … Read more

Error: Can´t access facebook comment plugin admin page

I had to change the plugin file to make it work. I think it can help someone and even the plugin’s author should consider making these changes. on class-admin.php, create this function at the beggining (can be line 9): function loadXmlByCurl($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = … Read more

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