Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to insert shortcode for register page only


  • designingforgrowth
    Participant

    @designingforgrowth

    I’m looking for any guidance on what code to put in, where should it go in the php file and in which php file should I put in the shortcode?

    The shortcode is from the popup maker plugin and I want it to only work on the registration page (register.php) The idea of the plugin is to activate a popup when the person is about to leave the registration page. The plugin works perfectly fine on other pages, but it won’t work on the register page.

    Here’s the code that Iv’e tried:

    Option 1:`
    <?php echo do_shortcode(‘[popmake-20646]’);?>`

    Option 2:
    <?php echo apply_filters('the_content',"[popmake-20646]"); ?>

    Option 3:
    <?php if ( is_page( 'register' )) echo do_shortcode('[popmake-20646]'); ?>

    Option 4:

    <?php if(!is_home()): ?>
    
      <div id="cristi"><?php echo do_shortcode( '[popmake-20646]' ) ?></div> 
    
    <?php endif; ?>

    I am not very good with php. I only want this popup to work on the register page. What am I doing wrong? I put in the code listed above into the register.php file. Should it go into a functions.php file or another file? Do I need to create a div to “hold” the code?

    Any help would really be appreciated.

    Thank You

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar