WordPress.org

Ready to get started?Download WordPress

Forums

Edge Suite
[resolved] Static homepage - shortcode in template? (5 posts)

  1. nix255
    Member
    Posted 1 year ago #

    Hi,

    The plugin works great with version 3.5.1, I have even managed to activate the animation from outside of the edge animation which is good.

    My problem is that I only want the edge animation to appear on a static home page. I have separate front-page template for it and have inserted the php code for the location of the animation. However it only works if I set the default animation in the settings for every page. Even if I set the blog page animation it won't appear. I haven't tried it yet, but is it possible to use the shortcode in the template rather than in the page content? Perhaps an option in the settings for a static home page only would be useful.

    Thanks for a great plugin

    http://wordpress.org/extend/plugins/edge-suite/

  2. nix255
    Member
    Posted 1 year ago #

    UPDATE
    Sorry I should have tried the shortcode in the template before I wrote the above. I placed the following code in the template and it worked a treat, maybe it will help someone else.

    if(function_exists('edge_suite_view')){
         echo edge_suite_view();
         echo do_shortcode("[edge_animation id='1']");
     }

    The settings for default and blog page in the Edge animate plugin are both set to none.

  3. ti2m
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    as long as it works... but maybe to help others. edge_suite_view() will print the default or blog page composition. If you don't need them or have them set to none you can also remove the function call. do_shortcode is also an option, but you can also directly call edge_suite_comp_view_inline($id, $css_style). Second parameter is optional, so basically for your case

    if(function_exists('edge_suite_comp_view_inline')){
         echo edge_suite_comp_view_inline(1);
     }

    Maybe that's easier.

  4. nix255
    Member
    Posted 1 year ago #

    Thanks ti2m, that's a much better solution and works perfectly.
    Thanks for your help.

  5. ti2m
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, I've also updated the official tutorial on EdgeDocks so people don't have to got through the issues.

    Maybe consider voting for the plugin if you like working with it and/or report your working wp version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic