How to put the site map to every post?
You’re looking for breadcrumbs, not a site map. There are plenty of plugins in the WordPress repository that might suit your purpose: breadcrumbs plugins.
You’re looking for breadcrumbs, not a site map. There are plenty of plugins in the WordPress repository that might suit your purpose: breadcrumbs plugins.
The easier way can be have a group of users called teachers and give just the teacher’s group the permission to visit the page. There are many plugins for permission handling and grouping users so you’ll just need to search WordPress plugin repository. Just an example: groups plugin Another possible answer can be : multi … Read more
You can use wp_list_pages with the child_of argument: /** * Display hierarchical list of all posts for a given post. * * @param int|WP_Post $post Display for post. Defaults to current post/page. */ function wpse_184554_list_section( $post = null ) { if ( ! $post = get_post( $post ) ) return; if ( $post->post_parent && $ancestors … Read more
As it is explained here ‘wpseo_sitemap_’ . $filter . ‘_change_freq’ the $filter should be replaced with post type that you want to change, you can replace it with: homepage, blogpage, $post_type . ‘_archive’, $post_type . ‘_single’, $c->taxonomy . ‘_term’, author_archive. while the $post_type variable based on WordPress Codex can be replaced with: Post (Post Type: … Read more
You can use get_pages() instead and write some custom code like this : $args = array(‘exclude’ => ‘5’, ‘sort_column’ => ‘ID’ ) $pages = get_pages($args); foreach ( $pages as $page ) { echo $page->post_title; } You may of course elaborate more the code in order to obtain a tree. You may also check the source … Read more
You can safely place your robot.txt file as well as the sitemap.xml file into your websites root directory and NOT the WordPress directory. When a robot visits your site, the first place it checks is http://sitename.com/robots.txt, hence you want to keep these files at the root of your domain. You can also disallow what the … Read more
The code below does work, just make sure you are editing the correct themes function.php file! // Remove specific pages function gt_disable_sitemap_specific_page($args, $post_type) { if (‘page’ !== $post_type) return $args; $args[‘post__not_in’] = isset($args[‘post__not_in’]) ? $args[‘post__not_in’] : array(); $args[‘post__not_in’][] = 221; //locations $args[‘post__not_in’][] = 261; //blog return $args; } add_filter(‘wp_sitemaps_posts_query_args’, ‘gt_disable_sitemap_specific_page’, 10, 2);
You can fetch all the different post_types you have by using get_post_types(). Then you can loop through all posts of each post_types and echo all these posts (title + link). That way you have the freedom of formatting your sitemap the way you want.
If you already have the files sitemap.xml and (if you have gzip enabled in Simple Google Sitemap) sitemap.xml.gz in the root directory of your WordPress installation, try deleting them and create new empty files with the correct permissions for that plugin, then manually run the sitemap generator. If these files don’t exist, try creating the … Read more
In order to be indexed by google news you need a unique permalink structure containing a unique number. You seem to have a permalink structure of %postname% that doesn’t contain a number. You could change your permalinks for example to %post_id%/%postname% or %post_id%-%postname% in order to comply with google news requirements.