WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Static homepage – shortcode in template?

[Resolved] Static homepage – shortcode in template?

  • 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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Plugin Author ti2m

    @ti2m

    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.

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

    Plugin Author ti2m

    @ti2m

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Static homepage – shortcode in template?’ is closed to new replies.