Custom text-only header

File: functions.php It’s as easy as adding this to your functions.php file (of course having $wpse67109 set). add_theme_support( ‘custom-header’, $wpse67109_defaults ); File: index.php or any other template Simply don’t add the whole get_head_image() and get_custom_header()->foo stuff anywhere. Your headline template part could look like the following example: <header> <hgroup> <h1 class=”site-title”> <?php if ( display_header_text() … Read more

Possible to create placeholder images in WordPress editor that are clickable (should bring up uploader)?

such an answer would likely become unworkable/unusable after a WordPress update, as TinyMCE get updated and APIs change – by @TomJNowell While I agree with Tom, there still an be a general answer that explains the general concept and the parts that aren’t moving. The PHP plugin to set the default content First there has … Read more

Unwanted redirect in admin area

I solved it with the help of a colleagues of mine by adding the following lines into wp-config.php: $_SERVER[‘HTTP_HOST’] = $_SERVER[‘HTTP_X_FORWARDED_HOST’]; $_SERVER[‘REQUEST_URI’] = ‘/stuff/wordpress’ . $_SERVER[‘REQUEST_URI’]; $_SERVER[‘SCRIPT_NAME’] = ‘/stuff/wordpress’ . $_SERVER[‘SCRIPT_NAME’]; $_SERVER[‘PHP_SELF’] = ‘/stuff/wordpress’ . $_SERVER[‘PHP_SELF’]; $_SERVER[‘REMOTE_ADDR’] = $_SERVER[‘HTTP_X_FORWARDED_FOR’];

Hide page visual editor if template is selected – redux

The following works for me, testing with TwentyTwelve. Using load-{$pagenow} instead of admin_init avoids the checking for the global $pagenow. See comments for further info: // Run only when editing a page // For new pages load-page-new.php should be used // See: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/admin.php#L217 add_action( ‘load-page.php’, ‘hide_editor_wpse_88886’ ); function hide_editor_wpse_88886() { // Not really necessary, but … Read more

Restrict acceess of a page in backend

This can be done in two steps. First, add a hook to the page /wp-admin/edit.php?post_type=page to remove the desired page from appearing to other users. And another hook to redirect non-authorized users from trying to access the page directly /wp-admin/post.php?post=ID&action=edit. Here, the post type is page, but it can be changed to any other. Make … Read more

Is there a way to submit only meta box content in Post edit page

IMO, it’s much better to solve this with Ajax. Maybe it’s possible the way you’re proposing, but it seems a bit confusing from an User Experience perspective: two similar buttons that do different things. What if the user modifies the content and the custom fields, updates one and loses the other? Maybe the save_post action … Read more

How to build custom WP admin with custom URLs

WordPress has some pretty solid documentation for this. What you are asking for will require that you learn a good bit of programming. Check out here for basic plugin development information: https://codex.wordpress.org/Writing_a_Plugin This page has specific information about making your own administration panels: https://codex.wordpress.org/Adding_Administration_Menus If this is something you are passionate about I would consider … Read more

Timeout While Upgrading Network in Multi-site

I was using WordPress Multisite for multiple TLDs. Example: domain.com another-domain.org sample-domain.net The primary site was domain.com which was a valid registered domain name with proper DNS resolution. another-domain.org and sample-domain.net had both expired domain name registrations. A/K/A – The DNS wasn’t resolving properly. If you’ve got a WordPress Multisite setup similarly to mine, where … Read more