Skip Navigation

[Resolved] Page title on archive page.

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by melodyM 3 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#2302423

I've set up an archive for a custom post type called Freelancers. That page can be seen here:

hidden link

My question is how do I change the page title? It is currently showing the page title as the name of the first Freelancer listed on the page JACK CROUSE.

I found this support thread that described the same problem:

https://toolset.com/forums/topic/page-title-of-wordpress-archive/

But in that thread, Luo Yang asked "Are you using Views shortcode [wpv-post-title] to display the title of archive page?" I wasn't sure what to do here because I don't know how the title of the page is being displayed here. I'm guessing it's part of the theme. I haven't done anything to modify this. I don't know how or why it would be pulling the name from the first listing on the archive page or how to change it. We would like the page title to be All Freelancers. I realize I could just create a View to do this and place that View on a new All Freelancers page. But I've already created this archive page and wanted to keep it that way and am curious to learn how/why it is doing this and how to fix it in case we encounter this same issue again. Thanks for any assistance you can provide.

#2302767

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As you shared and based on the page source of the archive page, it does indeed looks like the archive title is coming from the theme but to ensure and what workaround I can offer you if any possible is depends on once I can review your site.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2302951

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Normally, you can filter the archive title using the WordPress hook "get_the_archive_title":

But it seems your theme is not respecting the hook

The only way I've to offer is, I've added the following JS code to your archive's JS section:
=> hidden link

jQuery(document).ready(function($){
    $(".page-title").html("All Freelancers");
});

If above solution does not suits your needs then you will have to consult your theme author about how you can filter the archive title.

#2303083

That works. All I'm worried about is that the page title says "All Freelancers", not about how that is achieved. You have it displaying what it needs to say, so I don't argue with success. 😉 Thanks a bunch yet again. You guys are awesome!

#2303087

My issue is resolved now. Thank you!