Page returns 404 for specific permalink

Check your database, in the postmeta table, for meta_key _wp_old_slug. When you change a slug, WP stores it and automatically redirects the old to the new, which sounds like the reason you initially couldn’t access /locations/. Once you delete the postmeta, visit Settings > Permalinks for good measure (this refreshes permalinks) and try either using … Read more

My page title turns into a h2 tag – What to do?

You need to alter the template files under the theme folder. In the folder template-parts there is content-page.php that renders the page (well, at least the part with the header) and content-single.php that has the single post’s title part. Just change the <h2> and </h2> tags to be <h1> and </h1> respectively on the <?php … Read more

Remove and change pages label

To change Number of items per page in Screen Options, add this code to functions.php of your theme: function wpse_modify_screen_option() { $number_of_items = 10; // change this to desired value $screen = get_current_screen(); if ( $screen->id != ‘edit-page’ ) return; $user_id = get_current_user_id(); if ( $user_id ) { update_user_meta( $user_id, ‘edit_page_per_page’, $number_of_items ); } } … Read more

Include images from pages in wp search.php results in default wp search

To include the attachment (media) post type in search results, use the following code snippet function attachment_search( $query ) { if ( $query->is_search ) { $query->set( ‘post_type’, array( ‘post’, ‘attachment’ ) ); $query->set( ‘post_status’, array( ‘publish’, ‘inherit’ ) ); } return $query; } add_filter( ‘pre_get_posts’, ‘attachment_search’ ); Source However, this does not take care of … Read more