Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM › Inquiry menu title hook
- This topic has 9 replies, 2 voices, and was last updated 8 years ago by
WCFM Forum.
- AuthorPosts
- September 12, 2018 at 3:38 pm #31507
fabeluna
ParticipantHello,
I have a custom menu added to the content of the my-account woocommerce page. If I load the new my-accoount inquiry endpoint, all the menu titles of my custom menu are changed to “Inquiries” (See screenshot). I had a look at your code and I think it’s up to the “the_title” hook, located in the file “class-wcfm-enquiry.php” at line 53 and 282. It would be grateful if you could fix this in next update?
Thanks,
LeniAttachments:
You must be logged in to view attached files. - September 12, 2018 at 3:48 pm #31510
WCFM Forum
MemberHi,
That’s something impossible, please check this – https://wclovers.com/wp-content/uploads/2017/11/wcfm_enquiry_myaccount.png
My Account from my system.You may even check at our demo as well – http://wcfmmp.wcfmdemos.com/my-account/
Can you please disable your custom code once and check this?
May you have missed something and that creates the mess.Thank You
- September 12, 2018 at 5:25 pm #31516
fabeluna
ParticipantHello,
thanks for quick reply, great support!
The problem is only visible, if there is any other content element on the woocommerce my-account page, that uses the wordpress function the_title().. When I remove my custom menu from the my account page, everything works fine. I don’t know if it is not allowed or recommended to use another content element besides the woocommerce my account shortcode at the my account page?
Thanks,
Leni - September 13, 2018 at 7:52 am #31557
WCFM Forum
MemberHi,
You are welcome π
When I remove my custom menu from the my account page, everything works fine. I donβt know if it is not allowed or recommended to use another content” – you may off course use that but your code should be like this –
$is_endpoint = isset( $wp_query->query_vars['inquiry'] ); if ( $is_endpoint && ! is_admin() && is_main_query() && in_the_loop() && is_account_page() ) { // New page title. $title = __( 'Inquiries', 'wc-frontend-manager' ); }“$is_endpoint” checking is very important here.
Thank You
- September 13, 2018 at 8:50 am #31566
fabeluna
ParticipantHello,
thanks for the code.
I Think you have misunderstood or I may not have expressed myself very well. See attached some screenshots for the purposes of illustration. On my Woocommerce account page I have placed the visual composer “dynamic_sidebar” element in addition to the “woocommerce_my_account” element. This sidebar contains the wordpress menu widget(WP_Nav_Menu_Widget) β I don’t use any other custom code by myself.
Thanks,
LeonieAttachments:
You must be logged in to view attached files. - September 14, 2018 at 4:11 am #31602
WCFM Forum
MemberHI,
That’s really strange!
I have even show you the code using which we are setting menu title.Anyway, we will add some more restriction on this and hope you will not have this issue anymore.
Thank You
- September 14, 2018 at 7:24 am #31621
fabeluna
ParticipantHello,
Perfect, many thanks for this! π
Leni - September 15, 2018 at 11:49 pm #31728
WCFM Forum
MemberHi,
WCFM new version is there, please update yours and take a look.
Thank You
- September 16, 2018 at 8:58 am #31731
- September 16, 2018 at 4:45 pm #31751
WCFM Forum
MemberYou are welcome π
If you get a chance then please leave for me – https://wordpress.org/support/plugin/wc-frontend-manager/reviews/
Thank You
- AuthorPosts
- The topic ‘Inquiry menu title hook’ is closed to new replies.