Will renaming a `content.php` file cause any problems?

There shouldnt be any issue, dont forget to change the slug in the template part call: get_template_part( ‘format’, get_post_format() ); the best practice is to have them in their own folder: get_template_part( ‘template-parts/post/format’, get_post_format() ); you can see the folder structure of twentyseventeen just change content respectively. How get_template will work: get_template_part will do a … Read more

Product subcat with duplicate name of a subcat of another cat gets the category name in the slug

It took me two days to figure this out in the proper way, so I’ll add it here for anyone else that may need it in the future. add_filter(‘wp_unique_term_slug’, ‘prevent_cat_suffix’, 10, 3); function prevent_cat_suffix($slug, $term, $original_slug) { if ($term->post_type == ‘product’ && $term->parent !== 0) { return $original_slug; } return $slug; } As you can … Read more

How do i get the direct neighbor in a hierarchy

Well… I don’t think get_previous_posts_link would help you. It only return link to the previous set of posts within the current query. (see previous_posts_link it prints this link, and get_previous_posts_link returns it). And quote from Codex: Prints a link to the previous set of posts within the current query. If you need the values for … Read more