[Plugin: SimpleModal Contact Form (SMCF)] How to add the Simple Modal contact form into 1 specific p (5 posts)

  1. gabysun
    Posted 6 years ago #


    I am not an expert on WordPress.I want to know how to add this plugin into 1 specific page? And not all of them.

    I added the following to the "pages" php code and the plugin in obviously appeared on every page.
    <?php if (function_exists('smcf')) : ?>
    <?php smcf(); ?>
    <?php endif; ?>

    I need it to inserted specifically in 1 page only (not the main page).
    How do I do that?

    Thank you.



  2. Eric Martin
    Posted 6 years ago #

    If you only want the link to show on a particular page, you could do something like:

    <?php if (function_exists('smcf') && is_page('PAGE-SLUG')) : ?>
    <?php smcf(); ?>
    <?php endif; ?>

    Replacing PAGE-SLUG with the name/slug of the page you want it to load on.



  3. gabysun
    Posted 6 years ago #

    thanks a lot!!!
    it works great now!

  4. gabysun
    Posted 6 years ago #

    a couple of questions:
    how do i
    - change the size of he text linked to the plugin?
    - place it in the center?
    - insert it in the body of my blog, and not on the top, bottom or sidebar?

    if you could please answer to at least the first one, i'd really appreciate it.


  5. Eric Martin
    Posted 6 years ago #

    The link has a class of smcf-link, so you can add the following to your stylesheet:

    .smcf-link {}

    Not sure what you mean by the body of your blog. Anywhere that you want it to show, just create a link with a class of smcf-link.

    <a href="/contact" class="smcf-link">contact</a>

Topic Closed

This topic has been closed to new replies.

About this Topic