How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums PokaTheme support Template page: Reviews archive

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #18389
    Peter Verhoeven
    Participant

    Hi,

    After the update to the newest version, some changes on individual pages (template) are lost. My fault.
    Where can I find the page: Reviews archive ? –> To edit the H1, and add some text before the archive affiliates will be shown.

    Kind Regards,

    #18391
    admin
    Keymaster

    Hi Peter,

    First, if you refer to code changes that you did, I suggest not to overwrite the parent theme files, only do code changes in the child theme.

    About the Reviews archive page, this isn’t a specific page, it’s a template, so if you want to make changes to it you should copy archive-affiliates.php to your child theme and make changes there.

    The “Reviews archive” string is translatable, we have a guide for creating/changing translation strings here: https://pokatheme.com/topic/how-to-createedit-language-packs/

    #18392
    Peter Verhoeven
    Participant

    Thank you very much, I found it and backed up the tekst (from Google Cache).
    One last question about this:

    <?php
    /**
    * The arhive template of ‘affiliates’ CPT.
    *
    * This is the template that displays all pages by default.
    * Please note that this is the WordPress construct of pages
    * and that other ‘pages’ on your WordPress site may use a
    * different template.
    *
    * @link https://codex.wordpress.org/Template_Hierarchy
    *
    * @package PokaTheme
    * @since 1.0.0
    */

    get_header();

    ?>

    What is de best solution to complete overwrite the <head><title>name Re</title> without errors?
    I Think a lot of affiliates should do this.

    #18393
    admin
    Keymaster

    Hi again Peter,

    You want to change the <title> element?

    Maybe you could go with a SEO plugin like Yoast, I’m pretty sure if you install it it lets you change the title that shows up there.

    • This reply was modified 1 month ago by admin.
    #18395
    Peter Verhoeven
    Participant

    Hi again,

    I use Yoast indeed for this website.
    There are no categories for the reviews, so there is no page to edit. That’s the reason why I overwrote the archive-affiliates.php page.

    All the reviews are without any category. Because that’s the best hierarchy for me.

    You can find see here:
    https://energievergelijker.online/energieleverancier/

    Thanks 😉

    #18396
    admin
    Keymaster

    You can add this code either in your child theme’s functions.php or if you use a plugin like Code Snippets. Replace “Your Custom Title Here” with your desired title.

    // Function to modify the title for the 'affiliates' post type archive
    function custom_affiliates_archive_title($title) {
        // Check if it's the 'affiliates' post type archive
        if (is_post_type_archive('affiliates')) {
            $title = 'Your Custom Title Here'; // Replace 'Your Custom Title Here' with your desired title
        }
        return $title;
    }
    add_filter('pre_get_document_title', 'custom_affiliates_archive_title', 9999);
    
    
    • This reply was modified 1 month ago by admin. Reason: Mention child theme
    #18398
    Peter Verhoeven
    Participant

    Yes, this is great!
    Updatet in custom code, it works fine.

    I appreciate it very much.
    Thanks a lot.

    #18399
    admin
    Keymaster

    Hi Peter!

    We’re here for you anytime! Feel free to reach out whenever you need assistance.

    #18501
    Peter Verhoeven
    Participant

    Hi,

    I’m happy with my template, and still see new options.
    But for now I would like to change 3 headers (text in template):

    Frank Energie


    –> overview
    –> author
    –> Related reviews

    This because I have a Dutch site, and don’t like the English language here.

    Could you tell me which page(s) in the ftp folder I should change?

    Kind regards,
    Peter

    #18511
    admin
    Keymaster

    You can change any of the strings of the theme with the translation files of the theme.

    We have a guide for creating/changing translation files here: https://pokatheme.com/topic/how-to-createedit-language-packs/

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.