admin管理员组文章数量:1419611
I have a Posts page (/) which has a tab/button for each Category. I would like my Category pages to open this tab instead of loading the default Category page. Is there a way to do this so that the Category title and meta description (via Yoast) which I will set will show in Google, but the tab of the Posts page load instead of just the Category page?
I have Categories in two hierarchies; single level ones, and ones which are a sub-category below the main Category of "Country".
Examples:
/ this should load /?tx_category=education
/ this should load /?tx_category=japan
Would a simple 301 or 302 redirect cause the Google entry title/meta/url to show the redirected page info and pass rank to the Posts/Locations page? I have tried to read around the subject and not sure.
Any help would be appreciated :)
I have a Posts page (https://www.obsidianurbexphotography/locations/) which has a tab/button for each Category. I would like my Category pages to open this tab instead of loading the default Category page. Is there a way to do this so that the Category title and meta description (via Yoast) which I will set will show in Google, but the tab of the Posts page load instead of just the Category page?
I have Categories in two hierarchies; single level ones, and ones which are a sub-category below the main Category of "Country".
Examples:
https://www.obsidianurbexphotography/category/education/ this should load https://www.obsidianurbexphotography/locations/?tx_category=education
https://www.obsidianurbexphotography/category/country/japan/ this should load https://www.obsidianurbexphotography/locations/?tx_category=japan
Would a simple 301 or 302 redirect cause the Google entry title/meta/url to show the redirected page info and pass rank to the Posts/Locations page? I have tried to read around the subject and not sure.
Any help would be appreciated :)
Share Improve this question asked Jul 8, 2019 at 4:46 ObsidianObsidian 376 bronze badges1 Answer
Reset to default 0For now I have done this via category.php
/* Redirect Category to Post Grid tab */
<?php
$cat = get_queried_object();
wp_redirect( site_url('/locations/').'?tx_category='.$cat->slug );
exit();
本文标签: categoriesCategory pages redirecting to tab on Posts page grid
版权声明:本文标题:categories - Category pages redirecting to tab on Posts page grid 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745317868a2653235.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论