WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. gabysun
    Member
    Posted 4 years ago #

    Hi

    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.

    Gaby

    http://wordpress.org/extend/plugins/simplemodal-contact-form-smcf/

  2. Eric Martin
    Member
    Posted 4 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.

    HTH

    -Eric

  3. gabysun
    Member
    Posted 4 years ago #

    thanks a lot!!!
    it works great now!

  4. gabysun
    Member
    Posted 4 years ago #

    emartin24:
    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.

    thanks

  5. Eric Martin
    Member
    Posted 4 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