Restrict the list of parent pages to only those which are created by current user

Classic editor You can use the filter hook page_attributes_dropdown_pages_args and set authors parameter in query arguments. add_filter( ‘page_attributes_dropdown_pages_args’, ‘se343814_own_post_as_post_parent’, 10, 2 ); function se343814_change_post_type_args( $dropdown_args, $post ) { // // for which types to apply the filter if ( $post->post_type != ‘page’ ) return $dropdown_args; $dropdown_args[‘authors’] = get_current_user_id(); return $dropdown_args; } Block editor In the … Read more

Published pages missing

Generally when content is missing it is often related to caching plugins. One of those plugins is OptimizePress which can sometimes conflict and make it seem the content is missing. Here is what you can try: Deactivate all plugins and check again. Ensure the server has no caching enabled by asking your hosting provider. Check … Read more

Page titles for internal classification of landing pages

The easiest way to do this without editing the page.php template in your theme is to add it as a custom field, then use a plugin (or code) to display that custom field in the control panel on your Pages list. The plugin I’d recommend is Admin Columns. It’s free and highly-rated. Once that’s installed, … Read more

Parent page shows no child content

I just installed a fresh copy of WordPress and tried to create one parent page Pages are just pages, there’s nothing special about parent pages, and it’s not a term normally used but the page shows no content If the page has no content, then there is no content to show regardless of which Official … Read more

Insert page content into another page with a changed variable

Assuming you want to replace it with some static value (well, you can always change this anyway), some kind of find and replace snippet like this can do the trick: $content = apply_filters( ‘the_content’, $post->post_content); // set the replacement string value $replace = “REPLACEMENT”; // make sure the quotes used are exact $find_start = “<param … Read more

Can I “protect” a page with a form asking for an email address?

What about filtering the_content? function se365701_require_email ( $content ) { if ( is_page( ‘require_email’ ) ) && !isset( htmlspecialchars( $_COOKIE[‘submitted_email’]) ) { return $form; // your MailChimp Form Code } else{ return $content; } add_filter( ‘the_content’, ‘se365701_require_email’ ); Note that your form provide itself may have a cookie or you may need to set it … Read more