【发布时间】:2017-07-09 03:25:51
【问题描述】:
我想重新组织我的单一课程页面(我想可以与 woocommerce 的单一产品相媲美)。我选择添加一个具有 inline-flex 布局(浅蓝色背景)的容器,并创建一个部分,在其中添加来自各种操作的内容。现在我设法将标题和内容添加到此父部分,但是当我尝试添加按钮时,它们出现在该部分之外。即使我在添加动作的过程中是一致的。任何(其他)方法可以将按钮放入该部分?提前致谢!
add_action( 'sensei_single_course_content_inside_before', 'add_attributes_to_header', 20 );
function add_attributes_to_header(){
add_action( 'sensei_single_course_content_inside_before', open_container_div_section() ,7);
//Opens the second container in the header bar(the one you see highlighted in the picture)
add_action( 'sensei_single_course_content_inside_before',array( 'Sensei_Course', add_the_title_to_header()), 50 );
//Adds 'deel 1 - hoofdstuk 1'
add_action( 'sensei_single_course_content_inside_before',array( 'Sensei_Course', the_content()), 51);
//adds 'met een header3' and the other text below that
add_action( 'sensei_single_course_content_inside_before', add_the_button_to_header(), 52);
//calls seperate function to place the button, but fails to get it in the container
add_action( 'sensei_single_course_content_inside_before',array( 'Sensei_Course', 'the_course_enrolment_actions'), 55);
//THIS also adds the button, but also puts it beside the container
add_action( 'sensei_single_course_content_inside_before', close_container_div_section() ,75);
//Closes the section container in the header bar
}
【问题讨论】:
标签: wordpress woocommerce hook-woocommerce woothemes