Has this been fixed yet because i am experiencing the exact same problem - i want to pull the dynamic tag title but it will only allow me to pull the archive title which ends up being the category. thanks!
Hi Christian, thanks - thats helpful information i’m supposed to launch the site in 15 days, so because of that I want to know if this release will be coming before then. I’m not sure if you are allowed to disclose this …
Hi @jamievilasini,
Unfortunately, there is no definite date when it will be released. There are other issues and features that are needed to be ironed out too
Thanks!
Thanks @Rad - one more question - along with the Tag title dynamic content - will this also include the title for the year and month archives?
Hey @jamievilasini,
Regretfully, no. It’s only currently for Terms. I’ll add this as feature request so it might be taken into account in the next or future releases.
Thanks.
thanks for the update. I have enjoyed it and its worked well for most circumstances. Am I missing something, I have a custom post type (hardware) - on archive page(website.com/hardware) for the post type, is there a variable for that name? I can’t assign a header to the page, so I need to dynamically insert text.
Hi @stuartborders,
Yes, category and archive pages will be using the global header. You will have to create a header and assign it as the global header so that your category and archives pages will have a custom header. Dynamic content supports custom post type. It would be best if you can open a new thread and give us more details on what you are trying to achieve. What exactly is not clear and what is not working. What have you tried so far. This way we can help you better. If in case needed, please share site URL and credentials inside a secure note. Thank you.
I have a global header selected. I am asking what is the variable use in the headline element that will display the Post type title.
{{dc:archive:title}} is what is used on my taxonomy header, but it doesn’t show post type title on the root post type page. I know I have the correct header.
Hi @stuartborders,
If that page you share is what you meant by root post type page, yes it should work. Since that is an archive page of a custom post type {{dc:archive:title}}
should work like on others. I have tested it on my install and it is working. Wouls you mind sharing credentials inside a secure note so we can your setup? Thank you.
I added the info the previous secure note. thank you!
Hi @stuartborders,
As the Hardware Solution is a taxonomy that does not have any place to add an archive title in the admin as it is not like the normal post category which the theme gives an option to add Archive Title.
As you already have the header assigned to the Hardware Solution main archive page, you simply can add a static text. Whatever you want, you do not need to add a dynamic one as it is only showing for one page and that is the archive of the Hardware Solutions.
In this case, if you want to add dynamic content you need to install a plugin such as the Advanced Custom Fields Pro and add an extra custom field into the Hardware Solutions taxonomy and then you can use the Dynamic content and the ACF field to show the value.
Thank you.
I am not talking about the Taxonomy. that header does work correctly. I am talking about the Custom Post Type “Hardware Solutions”. Please advise
Hey @stuartborders,
I believe what Christopher was saying is, though the “hardware solutions” page is an archive page, it is not a category or a tag. It is the main index page (like the blog page and shop page of WooCommerce) of your custom post type and the Dynamic Content has no variable for that. The Dynamic Content currently only displays category and tag titles.
The solution of Christopher is also correct. I’ll clarify it though.
- Duplicate your archive header
- Use a static headline instead of Dynamic Content
- Assign the header to your Hardware Solutions index page by using this condition
is_post_type_archive('hardware-solutions')
.
I’ve already placed the condition in your child theme’s functions.php during my test. Just do the header duplication part and replace the header assigned to it.
Your Hardware Solutions “category” still uses the is_archive
assigment (see secure note).
Hope that helps.
Ahhh.
I totally forgot that I had added that code to the functions file!!! Geez. thank you for your explanation and follow-up.
While this works great for the archive of the post type (and I am very thankful), I am having an issue with assigning a header to “All Refurbished Hardware Posts” or other post types. Generally only a couple of them show up in the selection area in the header admin. Am I missing something? Is there another “is_post_type_archive” type function I can use to assign the headers to the correct post type single post?
Is an example of a header I can’t assign.
Hello @stuartborders,
You can edit the code shown by @Christian and insert this another condition:
if ( is_post_type_archive('refurbished-hardware') || get_post_type() == 'refurbished-hardware' ) ) {
match = 1234;
}
This condition will assign header 1234
to the “refurbished-hardware” archive or any single post that the post type is “refurbished-hardware”.
For reference, please check out the codex: https://developer.wordpress.org/reference/functions/get_post_type/
I already use if ( is_post_type_archive('refurbished-hardware') {}
to match on the archive. Adding get_post_type()
to the condition makes it work on the single post, but over writes the archive post header. I am trying to have
- A header for the archive that is specific to that post type and not using dynamic text
- A header for the single post that puts the title into the header dynamically
#1 already works fine thanks to a previous thread.
#2 usually I would use the gui in the header builder to select “All Refurbished Hardware Posts”. Unfortunately (I assume due to the number of posts on the site) it does not load all of the Post Type options. It would be nice if the search could work where I could select this option. its such a nice feature. However I am left trying to code it in the functions, which is fine. I just can’t get it to differentiate between #1 and #2 scenarios.
Hello @stuartborders,
Not all post types will load in the header builder. That is why you need to have a custom condition to resolve it. We recommend that you have this condition:
if ( is_post_type_archive('refurbished-hardware') ) {
match = 1234;
} else if ( is_singular('refurbished-hardware' ) ) {
match = 5678;
}
This way you will have a dedicated header for the post type archive, you also have another header for the single post type page.
Hope this helps. Kindly let us know how it goes.