[Resolved] Post Header Links

Home Forums Support [Resolved] Post Header Links

Home Forums Support Post Header Links

Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #131574
    Tristan

    I’m actually still running the super package and just update the individual plugins as they come out, but I have installed the latest pageheader version.
    Do you still offer an upgrade to premium for those who bought super? Im definitely keen

    #131576
    Tom
    Lead Developer
    Lead Developer

    Hmm, the latest version of Page Header should work with that code.

    I do offer an upgrade, just give me a shout at support@generatepress.com πŸ™‚

    #131580
    Tristan

    Will do man thank you.
    Yeh I’m not sure where it’s gone wrong.
    I’ve got the blank child theme activated, running Page Header 1.3.32.
    This is the full code in functions.php of the child theme:

    <?php
    /**
     * Generate child theme functions and definitions
     *
     * @package Generate
     */
     
    add_filter( 'generate_page_header_target','generate_open_page_header_new_tab' );
    function generate_open_page_header_new_tab()
    {
          return ' target="_blank"';
    }
    
    ?>
    #131599
    Tom
    Lead Developer
    Lead Developer

    Ah, figured it out! I gave you the wrong filter name.

    This should do it:

    add_filter( 'generate_page_header_link_target','generate_open_page_header_new_tab' );
    function generate_open_page_header_new_tab()
    {
          return ' target="_blank"';
    }
    #131604
    Tristan

    Works perfect!! Thank you! πŸ™‚

    #131606
    Tom
    Lead Developer
    Lead Developer

    No problem! πŸ™‚

    #139387
    Markus

    I’m running the latest GP Premium version. If it is possible now to open the page header image link in a new window, I can’t find it πŸ™

    The theme is running at multilingual installation and works fine. Did I understand right, when I update GP over the Network Admin that the GP versions at the “copied” other language version are not updated?

    Thanks
    Markus

    #139435
    Tom
    Lead Developer
    Lead Developer

    You would have to use the above code to open the links in a new window: https://generatepress.com/forums/topic/post-header-links/page/2/#post-131599

    When you update GP/GP Premium, it shouldn’t have any affect on your content.

    #139678
    Markus

    Where should I ad the code?

    GP Hooks? After head area? Or in the function.php? Would this be save if I update something?

    #139692
    bdbrown

    @Markus – it would go in your child theme functions.php file.

    Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

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