Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何将带有下拉列表的菜单选项卡添加到我的帐户页面_Php_Function_Woocommerce_Hook Woocommerce - Fatal编程技术网

Php 如何将带有下拉列表的菜单选项卡添加到我的帐户页面

Php 如何将带有下拉列表的菜单选项卡添加到我的帐户页面,php,function,woocommerce,hook-woocommerce,Php,Function,Woocommerce,Hook Woocommerce,如何向woo commerce myaccount页面添加下拉列表项。 这是我的密码 add_action( 'init', 'loyalty_points_my_account_new_endpoints' ); function loyalty_points_my_account_new_endpoints() { add_rewrite_endpoint( 'loyalty_points', EP_ROOT | EP_PAGES ); } add_filter(

如何向woo commerce myaccount页面添加下拉列表项。 这是我的密码

add_action( 'init', 'loyalty_points_my_account_new_endpoints' );    

function loyalty_points_my_account_new_endpoints() {
    add_rewrite_endpoint( 'loyalty_points', EP_ROOT | EP_PAGES );
}   

add_filter( 'woocommerce_account_menu_items', 'loyalty_points_my_account_menu_items', 10, 1 );
function loyalty_points_my_account_menu_items( $items ) {    
    $items['loyalty_points'] = __( 'Loyalty Rewards', 'my account' );    
    return $items;    
}    

/**
* Get new endpoint content
*/    
add_action( 'woocommerce_account_loyalty_points_endpoint', 'loyalty_points_endpoint_content' );
function loyalty_points_endpoint_content() { 
    include( plugin_dir_path( __FILE__ ) . 'frontend/loyalty-reward-points.php');
}
现在我在myaccount页面中获得忠诚度奖励选项卡,但我希望忠诚度奖励选项卡包含下拉列表项,并且当选择这些链接时,每个列表项都会获得不同的页面模板


请检查上面的图片。我想要像这样的和每个列表项,使用单独的模板调用

嘿,你解决了吗?没有,没有解决,我没有解决这个问题嘿,你解决了吗?没有,没有解决,我没有解决这个问题