Wp user custom post type
-
Hi! Thanks for the awesome plugin.
Can you help me a bit please? I followed that tutorial:
https://wedevs.com/docs/wp-user-frontend-pro/developer-docs/add-a-new-tab-on-my-account-page/
Added that code to functions.php:
function wpuf_my_page( $sections ) {
$sections = array_merge( $sections, array( array( ‘slug’ => ‘addmypost’, ‘label’ => ‘Добавить пост’ ) ) );return $sections;
}add_action( ‘wpuf_account_content_my-page’, ‘wpuf_addmypost’, 10, 2 );
function wpuf_addmypost( $sections, $current_section ) {
wpuf_load_template(
“dashboard/addpost.php”,
array( ‘sections’ => $sections, ‘current_section’ => $current_section )
);
}
Then added that code to addpost.php:<?php global $current_user;
echo do_shortcode(‘[wpuf_form id=”1048″]’);
?>
The 4th menu item appeared, however shortcode doesn’t load. Where exactly should I upload addpost.php?/wp-content/themes/theme/wp-user-frontend/templates/dashboard/
/wp-content/themes/theme/
/wp-content/themes/theme/wp-user-frontend/
Or is there anything else that I did wrong? Thanks!My site is https://pokupaem-kg.ru
The topic ‘Wp user custom post type’ is closed to new replies.