doutuo7126 2015-10-26 18:28
浏览 131

将FullPage.js集成为Wordpress插件:我可以调整此插件以与其他插件一起工作吗?

I recently followed this post on integrating FullPage.js as a WordPress plugin.

I'm having trouble getting the plugin to work with other plugins - such as "All in one Event Calendar". The calendar works it just won't display on pages using FullPage.js

I understand the limitations that a plugin meant for landing pages has, but I was wondering if there was any way to edit the existing FP plugin template so that it can utilize other plugins while also taking over the theme's template?

Perhaps editing this statement?:

function fullpage_template( $original_template ) {

  if ( get_post_meta( get_the_ID(), 'fullpage_js', true ) ) {
  return dirname(__FILE__) . '/templates/fullpage.php';
  } else {
  return $original_template;
  }

}

I really appreciate any assistance on this!

  • 写回答

1条回答 默认 最新

  • dongxing1412 2015-10-27 12:04
    关注

    You might be having problems because you are using verticalCentred:true or scrollOverflow:true.

    As said in the fullpage.js FAQs

    My other plugins don't work when using fullPage.js

    Short answer: initialize them in the afterRender callback of fullPage.js.

    Explanation: if you are using options such as verticalCentered:true or overflowScroll:true of fullPage.js, your content will be wrapped inside other elements changing its position in the DOM structure of the site. This way, your content would be consider as "dynamically added content" and most plugins need the content to be originally on the site to perform their tasks. Using the afterRender callback to initialize your plugins, fullPage.js makes sure to initialize them only when fullPage.js has stopped changing the DOM structure of the site.

    评论

报告相同问题?

悬赏问题

  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)