Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #183493

    wips
    Participant

    Hello

    I have a problem. I can’t use the Plugin Ninja Popups on the Portfolio Site.
    The plugin works on every page, wherever I like, but not on the Portfolio Site.

    Example: normal site (works) http://www.wordpress-info.ch/kontakt/
    portfolio site (not work) http://www.wordpress-info.ch/beitraege/

    I think the Problem is, that the portfolio site is special.

    d I made the same on the portfolio site

    #183880

    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    Yes, because portfolio page uses page template where it displays the list of portfolio items from database and not from page content ( editor’s content ).

    Where do you like it to be displayed? Maybe I could provide you a simple code for that.

    Or try this,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then add this code at your child theme’s functions.php

    add_action('x_before_site_end', 'display_ninja_form');
    
    function display_ninja_form () {
    echo x_is_portfolio() ? do_shortcode('[ninja-popup id="301" autoopen="true"]') : '';
    }

    Hope this helps.

    #184586

    wips
    Participant

    Thanks for you help! I will be try it.

    Best whishes

    #184630

    Kory
    Keymaster

    You’re welcome!

    #185135

    wips
    Participant

    I installed the Child Theme, and everything works perfekt, also Ninja Popups on the Portfolio Page.

    Thanks!

    #185280

    Kory
    Keymaster

    You’re welcome 🙂