• Resolved david11400

    (@david11400)


    Good morning,

    I would like to integrate my corner shortcode [corner-ad id=1] in my wordpress blog home page.

    Is it possible ?

    I’ve this code <?php echo do_shortcode(‘[corner-ad id=1]’); ?>

    Where should I insert this code ?
    In functions.php file ?
    In other file ?

    My WP version is 4.9.5–fr_FR.
    My WP theme is AscendVersion : 1.2.4 by Kadence Themes.

    Thank you

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @david11400

    If the id of your Ad is 1 and your homepage is a common page of the website, would be sufficient with insert the shortcode into the page’s content:

    [corner-ad id="1"]

    If your homepage is a list of posts, then, you should to insert the shortcode directly into the template file used for the homepage in the theme active in your website, usually the home.php file (you can find the hierarchy of template files in the following link: https://developer.ww.wp.xz.cn/files/2014/10/wp-hierarchy.png), but this time using the piece of code:

    
    <?php echo do_shortcode('[corner-ad id="1"]'); ?>
    

    Best regards.

    Thread Starter david11400

    (@david11400)

    Thank you very much

    I insert the code anywhere in my home.php file ? It will work ?

    Plugin Author codepeople

    (@codepeople)

    Hello @david11400,

    Yes, you can insert the piece where you want, preferably at the end, after including all the content.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘code integration Blog Home Page’ is closed to new replies.