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

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

How to show ‘tags’ in ‘WordPress Pages’ [not Posts]

enter your tags instead of the specified ones or delete the extra ones: function wps_display_custom_tags ($post_meta) { // delete meta tags you do not want to display return array( ‘author’, ‘post-date’, ‘comments’, ‘sticky’, ‘tags’); } add_filter(‘twentytwenty_post_meta_location_single_top’, ‘wps_display_custom_tags’);

Change page name in admin list

You can use the_title hook to change the title of the post in the admin, something like this add_filter( ‘the_title’, ‘custom_post_title’, 10, 2 ); function custom_post_title( $title, $post_id ) { // Return early if not in the admin if ( !is_admin() ) return $title; $post_type = get_post_type( $post_id ); // You only need to change … Read more

Can I schedule my site to launch at a set time and date?

You should create a small plugin that checks the time stamp and run on an alternate page or similar. Bigger than the time stamp, the default WordPress run should work. An Example, write my answer to this question that’s not working code. The method timestamp is your key to control the logic for loading an … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)