Articles of wp admin

Allow SVG in WP step by step

I’m not strong in WP programming, bu I try to understand what to do to enable SVG in my site. I found that in need to add function below to functions.php: /** * Add SVG capabilities */ function wpcontent_svg_mime_type( $mimes = array() ) { $mimes[‘svg’] = ‘image/svg+xml’; $mimes[‘svgz’] = ‘image/svg+xml’; return $mimes; } add_filter( ‘upload_mimes’, […]

What do I need for testing a single script in admin

I like to test a single script in the wp-admin area. Do not know what to include at the top of my script.php file for testing including all kind if DB access + WordPress like $wpdb->get_results, $GLOBALS[‘wpdb’]->get_row, etcetera. Url for testing will be: www.mydomain.coml/wp-admin/script.php Is there a minimum of files to include so I can […]

Sort custom post types by last name in the backend

I have a custom post type called speakers, where post title is a speakers first- AND last name. I created it with this code: add_action( ‘init’, ‘create_post_type’ ); function create_post_type() { register_post_type( ‘speaker’, array( ‘labels’ => array( ‘name’ => __( ‘Speakers’ ), ‘singular_name’ => __( ‘Speaker’ ) ), ‘public’ => true, ‘has_archive’ => true, ‘supports’ […]

Making menu link open in new tab?

I’m trying to add a top level menu to the left sidebar of the WordPress admin panel. Here’s the code I currently have: add_action( ‘admin_menu’, ‘linked_url’ ); function linked_url() { add_menu_page( ‘linked_url’, ‘Menu Title’, ‘read’, ‘my_slug’, ”, ‘dashicons-text’, 1 ); } add_action( ‘admin_menu’ , ‘linkedurl_function’ ); function linkedurl_function() { global $menu; $menu[1][2] = “https://www.example.com”; } […]

Widget page stopped loading

I’m currently having an issue with the widgets page in the backend. however I’m having a heck of a time identifying what’s break the page. I’ve found there are 3 widgets that when removed from the theme, the page loads correctly. The page stops loading before the widget description in the left column of the […]

Order by modified date working in POSTS but not PAGES

I found the following code at bytefreaks.net. It adds a sort-able column to edit.php, but the column appears only on Posts and not on Pages (…?post_type=page) bytefreaks suggested putting it in functions.php but I wanted to avoid update problems so I installed the “My Custom Functions” plugin and put the code there. I don’t know […]

Mowing site to another domain in simplest way

I need to move my simple Wordpres site from www.mysite.oldplace.com to www.oldplace.com in most as possible simple and native way. My simple site specification: WP 4.4.2 Twenty Twelve 1.9 theme Polylang plugin 1.8.4 I know that I can install some plugins that might do this job, but I’m not sure they really does this job […]

Change post-slug using wordpress API? Change permalink of a post using php / jquery?

When calling wp_insert_post() see api there seems to be no possibility to set the post slug / the post permalink of the new entry. e.g. is there a way to check if: a string is possible to use as post-slug, if not available return error.

Can't update database after wordpress update from 3.8.1 to 4.4.1

I have just updated wordpress 3.8.1 to 4.4.1. Tried to update in various ways: Before updating I have deactivated all the plugins and switched to the default theme provided by wordpress i.e. twentyfourteen. Option 1: Update wordpress automatically. Files are updated successfully as I can the see the message. But it keeps loading with the […]

I installed WordPress locally now how do I login?

I downloaded a WordPress website that I am modifying for a friend. He gave me access to cPanel, where I downloaded the SQL and changed it on XAMPP. Now when I open >localhost/wp it opens the website but without the control panel. I think to modify I need to access >localhost/wp/wp-admin but I don’t have […]