Option for pages order in backend

In a theme with no menu locations defined – or a WordPress install with no menus set up – the default fallback option for menus is to display the output of wp_page_menu(). By default, this will output all of your pages firstly by their order, then by their title if the orders match. This makes … Read more

Is it possible to change slugs’ default behaviour?

Test you the following filter work for you: function wpse245094_fist_duplicate_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) { // slug had to change, we must have a duplicate if ( $original_slug !== $slug ) { // try to replace `-2` with `-es` $new_slug = preg_replace( ‘#-2$#’, ‘-es’, $slug ); if ( $new_slug !== $slug ) … Read more

Later blog post pages give 404 error

First, try rebuilding your permalinks. Go to Settings >> Permalinks and click Save, which will rebuild them. If that doesn’t work, go into your Settings >> Reading >> Blog pages show at most setting and try increasing or decreasing that and see how that changes things. Some themes have a setting that lets you adjust … Read more

Is it possible to restrict access to specific pages in the admin area based on the page slug?

So following from the comment discussion, a sufficient answer on another StackEx question goes like this: add_filter( ‘parse_query’, ‘exclude_pages_from_admin’ ); function exclude_pages_from_admin($query) { global $pagenow,$post_type; if (is_admin() && $pagenow==’edit.php’ && $post_type ==’page’) { $query->query_vars[‘post__not_in’] = array(’21’,’22’,’23’); } } The only part that’s terribly important to us is the array of post IDS. The problem is … Read more

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