Title: Neil's Replies | WordPress.org

---

# Neil

  [  ](https://wordpress.org/support/users/stupha/)

 *   [Profile](https://wordpress.org/support/users/stupha/)
 *   [Topics Started](https://wordpress.org/support/users/stupha/topics/)
 *   [Replies Created](https://wordpress.org/support/users/stupha/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/stupha/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/stupha/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/stupha/engagements/)
 *   [Favorites](https://wordpress.org/support/users/stupha/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/stupha/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/stupha/replies/page/2/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [publish date different from last draft save](https://wordpress.org/support/topic/publish-date-different-from-last-draft-save/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/publish-date-different-from-last-draft-save/#post-7231922)
 * Add this to your theme’s functions.php to update the date to current date-time
   when you press publish on any existing draft.
 *     ```
       function publish_date_now( $data , $postarr ) {
       	if( isset($postarr['ID']) && get_post_status( $postarr['ID'] ) == 'draft' ) {
       		$data['post_date'] = date('Y-m-d H:i:s');
       	}
       	return $data;
       }
       add_filter( 'wp_insert_post_data', 'publish_date_now', 10, 2 );
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Help needed with permalinks and add_rewrite_rule](https://wordpress.org/support/topic/help-needed-with-permalinks-and-add_rewrite_rule/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/help-needed-with-permalinks-and-add_rewrite_rule/#post-7229311)
 * Did you flush your rewrite rules? That usually fixes these kinds of problems 
   if the rule is correct: [https://codex.wordpress.org/Function_Reference/flush_rewrite_rules](https://codex.wordpress.org/Function_Reference/flush_rewrite_rules)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Image view problem](https://wordpress.org/support/topic/image-view-problem-1/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/image-view-problem-1/#post-7225346)
 * On a page that works, Natural World Gallery, the HTML for your gallery looks 
   like this (I’ve obviously removed most of the gallery items for legibility):
 *     ```
       <div id='gallery-1' class='gallery galleryid-140 gallery-columns-3 gallery-size-thumbnail'>
           <dl class='gallery-item'>
               <dt class='gallery-icon'>
                           <a href='http://www.chrishall-photography.com/wp-content/uploads/2016/01/Whale.jpg' rel="lightbox[140]" title="N1 Humpback Whale"><img width="150" height="150" src="http://www.chrishall-photography.com/wp-content/uploads/2016/01/Whale-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="N1 Humpback Whale" srcset="http://www.chrishall-photography.com/wp-content/uploads/2016/01/Whale-150x150.jpg 150w, http://www.chrishall-photography.com/wp-content/uploads/2016/01/Whale-45x45.jpg 45w" sizes="(max-width: 150px) 100vw, 150px" /></a>
               </dt>
               <dd class='wp-caption-text gallery-caption'>
                               N1 Humpback Whale
               </dd>
           </dl>
           ...
       </div>
       ```
   
 * Which looks valid.
    But on the Landscape and Metal Detecting pages, the gallery
   HTML is incomplete for some reason:
 *     ```
       <dl class="gallery-item">
           <dt class="gallery-icon"></dt>
       </dl>
       <dl class="gallery-item">
           <dt class="gallery-icon"><!-- see gallery_shortcode() in wp-includes/media.php -->
           <dl class="gallery-item">
               <dt class="gallery-icon">
                   <a href="http://www.chrishall-photography.com/metal-detecting-finds/attachment/398152_10150444970785706_9990288_n/"><img class="attachment-thumbnail size-thumbnail" src="http://www.chrishall-photography.com/wp-content/uploads/2016/02/398152_10150444970785706_9990288_n-150x150.jpg" sizes="(max-width: 150px) 100vw, 150px" srcset="http://www.chrishall-photography.com/wp-content/uploads/2016/02/398152_10150444970785706_9990288_n-150x150.jpg 150w, http://www.chrishall-photography.com/wp-content/uploads/2016/02/398152_10150444970785706_9990288_n-45x45.jpg 45w, http://www.chrishall-photography.com/wp-content/uploads/2016/02/398152_10150444970785706_9990288_n.jpg 206w" alt="M1 Philip & Mary sixpence, 1555" width="150" height="150" /></a>
               </dt>
           <dd class="wp-caption-text gallery-caption">
               M1 Philip & Mary sixpence, 1555
           </dd>
       </dl>
       <p>
       ```
   
 * There’s no enclosing, parent div such as `<div id='gallery-1' class='gallery 
   galleryid-140 gallery-columns-3 gallery-size-thumbnail'>`, and there are incomplete
   HTML tags (that last <p> tag above) and empty gallery items which may also be
   throwing it out.
 * Are you using shortcakes to place these galleries? If so, check that you have
   entered the shortcake and any attributes correctly.
 * Otherwise, if you are cutting and pasting from somewhere else, you have not copied
   the full, correct block of HTML to form the gallery.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [simple login to just one page on my site](https://wordpress.org/support/topic/simple-login-to-just-one-page-on-my-site/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/simple-login-to-just-one-page-on-my-site/#post-7223159)
 * The simple method is to set the page’s visibility to Password.
    Look in the Publish
   panel of the page edit screen, and click Edit next to Visibility: Public, then
   set to Password. This is not a login as such, and only works on a page-by-page
   basis, but might be enough.
 * If you need more complex and controlled access, try a plugin such as [WordPress Access Control](https://wordpress.org/plugins/wordpress-access-control/)(
   I’ve not used it, but looks like it might do the job). There are several other
   plugins that will perform similar tasks.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Invisible Media](https://wordpress.org/support/topic/invisible-media/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/invisible-media/#post-7223564)
 * If you do not have access to your server directly to change permissions (or the
   knowledge to do so), then you will need to speak to whoever hosts your site.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Taxonomies and XML Output](https://wordpress.org/support/topic/taxonomies-and-xml-output/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/taxonomies-and-xml-output/#post-7224002)
 * If you want to create lookups against specific data elements or filter against
   them, then custom taxonomies will give you greatest flexibility.
    There are methods
   to query against one or more taxonomies and terms. A starting point is here: 
   [https://codex.wordpress.org/Making_Advanced_Taxonomy_Queries](https://codex.wordpress.org/Making_Advanced_Taxonomy_Queries)
 * For the values that are unique to each RV, and therefore not suitable for a taxonomy,
   you might be better with a metabox of custom fields. A huge time-saver here is
   the Titan Framework plugin that makes creating and retrieving values a breeze.
   But you are still going to have to get your hands dirty to bring all the required
   data together for the XML output.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Moving to new host with new temp URL](https://wordpress.org/support/topic/moving-to-new-host-with-new-temp-url/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/moving-to-new-host-with-new-temp-url/#post-7222181)
 * Change those values to just the IP address, ignore the “/home/abcdefg” path as
   that’s just the internal path on the server, not the public URL.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Full Width Image](https://wordpress.org/support/topic/full-width-image-6/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/full-width-image-6/#post-7224538)
 * You will need to edit the CSS of your them to make this work, and there’s a possibility
   that the structure of the HTML in your chosen theme will not allow a full width
   image. Your best option is to select a theme that already has a full width image.
   There is a selection of them here: [https://wordpress.org/themes/tags/full-width-template/](https://wordpress.org/themes/tags/full-width-template/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Blog pages not working after changed a permalink](https://wordpress.org/support/topic/blog-pages-not-working-after-changed-a-permalink/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/blog-pages-not-working-after-changed-a-permalink/#post-7224916)
 * Try resetting your permalink by visiting Settings > Permalinks and clicking Save
   Changes. That often fixes permalink-related issues, so is always the first stop.
   Note any errors or messages you get.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Resetting Role Definitions](https://wordpress.org/support/topic/resetting-role-definitions/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/resetting-role-definitions/#post-7224915)
 * You’ll need to correct things in your database, using phpMyAdmin or a similar
   tool.
 * First,** back up your database** as it stands now. It may not be correct, but
   it’s at least functioning – just in case you do something wrong later.
 * 1. Reset the roles back to the wordpress default. Replace the value of the `wp_user_roles`
   field in the `wp_options` table with:
    `a:5:{s:13:"administrator";a:2:{s:4:"name";
   s:13:"Administrator";s:12:"capabilities";a:61:{s:13:"switch_themes";b:1;s:11:"
   edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";
   b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";
   b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";
   b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";
   b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";
   b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"
   level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";
   b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";
   b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";
   b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";
   b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";
   b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";
   b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";
   b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";
   b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";
   b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:11:"update_core";b:1;
   s:10:"list_users";b:1;s:12:"remove_users";b:1;s:13:"promote_users";b:1;s:18:"
   edit_theme_options";b:1;s:13:"delete_themes";b:1;s:6:"export";b:1;}}s:6:"editor";
   a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";
   b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";
   b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";
   b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";
   b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"
   level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";
   b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";
   b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";
   b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";
   b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";
   b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";
   b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"
   upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"
   publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";
   b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";
   a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";
   b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:
   1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:
   2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}`
 * Ensure you have no spaces before and after, and that you have copied the complete
   string. This block is taken from a fresh install of the latest WordPress.
 * 2. Reset roles for each user (if necessary).
    Check the IDs of each user you 
   want to fix in the `wp_users` table. Then look in the `wp_usermeta` table, find
   the row with the correct `user_id` and `meta_key` of `wp_capabilities` and replace`
   meta_value` with the relevant role default:
 * For administrators (which should always be for user_id 1):
    `a:1:{s:13:"administrator";
   b:1;}`
 * For subscribers:
    `a:1:{s:10:"subscriber";b:1;}`
 * You should now be able to log in as admin and change the roles as normal within
   the WordPress admin.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Failing at adding child theme functions](https://wordpress.org/support/topic/failing-at-adding-child-theme-functions/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/failing-at-adding-child-theme-functions/#post-7222069)
 * This line is not a correct php comment:
    `**/Product Stock Quantity Check For
   Course Calendar Page/**`
 * Either delete that line or change it to a proper php comment format:
    `// Product
   Stock Quantity Check For Course Calendar Page`
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Moving to new host with new temp URL](https://wordpress.org/support/topic/moving-to-new-host-with-new-temp-url/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/moving-to-new-host-with-new-temp-url/#post-7222067)
 * To get your site running, you only need to change two values in the wp_options
   database table: “site_url” and “home”. Make those changes via phpMyAdmin or some
   similar application, so you are not having to deal with a large sql file. Most
   hosts will have some kind of database tool in their control panels.
 * That will get your site functioning under the temporary domain at least. What
   will not work are any hard-coded full URLs within your content, but this will
   be enough to test that the most important elements are functional before cutting
   the domain over.
    Once confirmed, change those values back, then change the DNS
   on the domain.
 * The home directory path change should not pose a problem.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Creating a new page, want to assign it the same permalink as another page](https://wordpress.org/support/topic/creating-a-new-page-want-to-assign-it-the-same-permalink-as-another-page/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/creating-a-new-page-want-to-assign-it-the-same-permalink-as-another-page/#post-7206818)
 * Looks like the original page is a child page of your /about page. Check the Parent
   dropdown in the Page Attributes panel on the Page editing screen.
 * Also, permalinks must be unique within your site, regardless of page published
   status, so you’ll have to change the original permalink first, otherwise your
   new page will end up being something like /about/contact-us-2.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [paragraph padding](https://wordpress.org/support/topic/paragraph-padding/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/paragraph-padding/#post-7206816)
 * Try this in your css:
 *     ```
       div.floating-box {
             padding: 15px;
             font-size: 8px;
       }
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to change color of one menu item](https://wordpress.org/support/topic/how-to-change-color-of-one-menu-item/)
 *  [Neil](https://wordpress.org/support/users/stupha/)
 * (@stupha)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/how-to-change-color-of-one-menu-item/#post-7206814)
 * You probably need to increase the specificity of your CSS selector, but without
   seeing your menu html it’s hard to say with confidence what that selector might
   be.
 * Something along these lines perhaps (this is a guess from your css above):
 *     ```
       div #menu-primary .menu li.create.nav {
           color: black !important;
       }
       ```
   

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/users/stupha/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/stupha/replies/page/2/?output_format=md)