How to make a secondary Pages Screen

You’ll start with add_menu_page(), to create the actual admin page. From there, it’s really up to you, but I recommend using the WP_Posts_List_Table: nearly everything is built-in and ready to use. There are several comprehensive articles on creating a custom list table; most of them should be sufficient for getting you started.

Best approach to create a customized page

The only reason custom templates would not be searchable is if they stored significant amounts of content in postmeta fields, instead of the main content field. To have customizable layouts whose contents are still fully indexable by default WP search, use the Block Editor. You can create custom blocks if needed, but even the Core … Read more

Search page doesn’t recognise post_type=page

I found a solution in this answer here: https://stackoverflow.com/questions/63678063/wordpress-search-filtering-pages-and-posts I customised the function as follows: function page_search_filter( \WP_Query $query ) { if ( ! is_admin() ) { if ( $query->is_main_query() && $query->is_search() ) { if ( isset( $_GET[‘post_type’] ) && $_GET[‘post_type’] == ‘page’ ) { $query->set( ‘post_type’,’page’ ); } } } return $query; } add_action( … Read more

Live page errors should be hidden

In your wp-config.php look for the line reading: define( ‘WP_DEBUG’, false ); (This is set to false by default, if you’re troubleshooting it may be set to true on your install) After it, add: if( WP_DEBUG == true ) { /** Don’t display WP errors */ define( ‘WP_DEBUG_DISPLAY’, false ); /** Log errors to debug.log … Read more

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