I created an archive page and it is for a specific CPT (Team Members - how original ) and I encounter an issue, on that archive page when shared on social media or via messages. I have a generic archive page template and I have a single for the post itself. The CPT one does correctly apply the changes in the SEO template setting, but not all.
The url end in /team for that page and each member follows /team/jane-doe as an example. But when sharing the archive page the meta tags produced specifically link to the last team member added to the team even though the archive template SHOULD link to the slug of the archive page of the CPT - so in this case ‘/team’
Edit2: I should add that the url that will be shared in messages, social media, etc is valid however goes to the wrong URL. That is an undesired outcome. I know I can throw a SEO plugin at this problem, but I’d like to do this without if possible. If not, I’ll have to turn of SEO from Bricks (how) and use one of the myriad of plugins.
So, what am I doing wrong, missing, or is this a bug? I must say that I thought this worked at some point (the site is a few years old now).
Edit: I have updated this as a bug as the default Post type works as expected but any CPT does not. Versions this happens are 1.9.8 to v1.9.9 but might have been earlier versions as well. As I mentioned I believe this was not an issue under 1.8.x but I cannot verify this atm. I’ll have to see if I still have such an old version in an archive.
Your screenshot does not quite match your description - the og: tags represent the social media settings, not the settings from the SEO tab.
However, it is true that the open graph uses url, title, description and also image data from the last post if they are empty, which should not be the case.
We have already received an email report on this. The same problem occurs when the “shop” page is configured as the home page.
You can disable the SEO and open graph meta tags in Bricks » Settings » General » Misc.
Thanks @timmse, is there currently anything I should know about before making a decision to turn off SEO to leverage another plugin? Timeframe (if possible) or another solution?
do you have any update on this. IF I am correct the latest release did not address this, but I wanted to know if at least this is on the table for a near future release.
Thanks in advance,
Sebastian
Hi Sebastian,
The task is still on the todo list, but unfortunately, I still can’t give you a specific time frame. I will update this thread as soon as the issue is solved.
Solved it by replacing the code in frontend.php with the below
if (is_tax()) {
// If it's a custom taxonomy page, get the correct term link.
$term = get_queried_object(); // Get the current taxonomy term object.
if ($term && !is_wp_error($term)) {
$url = get_term_link($term); // Get the link to the current taxonomy term.
}
} else {
// For other pages, use the regular permalink.
$url = get_permalink();
}
$open_graph_meta_tags[] = '<meta property="og:url" content="' . esc_url($url) . '" />';
is there a way to get it to functions.php somehow so it wont get overwritten?