Mega Menu (same as 'blocks'?)

Posted in: Newspaper
Post count: 9

Hi Support Team,
I have your Newspaper theme installed for a client. I’m using Custom Post Types (CPT) on the Home Page blocks. These CPT’s use standard WP categories, they are registered with: ‘register_taxonomy_for_object_type( ‘category’, ‘cpt_slug’). That works nicely on the blocks, no problem there. But I’d like to have the same on the Mega Menu. However, that mega menu depends on ‘parent categories’ and ‘child categories’. Without a ‘parent’ category, no mega menu. But my CPT’s do not have ‘parent’ categories.
My question is: how can I get this to work (if at all?) in the mega menu? I have a feeling it should not be too difficult, although it probably involves some custom coding. I have no problem doing that, I just don’t know how.
I hope the above is clear, if not, I’ll be happy to explain further.
Thanks for your support (and by the way, a beautiful theme!).

Post count: 22421

Hi,

Unfortunately the mega-menu was not created to work with custom post types so in order to do this you will have to edit the function that adds the mega-menu: http://screencast.com/t/cS0MON4aJIZW and http://screencast.com/t/poPhV1ukgVaR
Unfortunately we cannot help in this matter as this represents customization and we cannot offer any custom work at the moment. Sorry. You can hire a freelancer to help out from sites like studio.envato.com

Thank you for your understanding.

Post count: 9

Comparing the php files for the normal ‘blocks’ (where the AJAX dropdown filter works with CPT’s) and the files used for the Mega Menu, there seems to be not much difference. So, I don’t understand why it cannot be added to the Mega Menu options (just like the option for CPT in normal blocks).
Having searched the Forum, I found this question is asked many times with always the same reply: “Not Supported”.
Your theme developers should realize that CPT’s are widely used, especially on large and complex websites where Newspaper is targeted at.
Anyway, the search for a solution continues.
In the meantime, I’ve just skipped your Mega Menu for Ubermenu (which supports CPT’s).

Post count: 22421

Hello,
We understand this and we are aware that CPT’s are widely used, but our theme has limited CPT support at the moment. We do try to improve this on every update and we will get there in future versions. At the moment though there is no easy solution for it. Sorry for the inconvenience.
Thank you!

Post count: 9

Thank you for your answer, but still not exactly happy, I started some experimenting.

What I did was this:

  • Put a block on an empty page (it’s ‘td_block_14’, but that doesn’t really matter, and just the block shortcode, no vc rows or vc_columns). It’s set to display 4 categories only.
  • Called that page from the ‘mega menu’ options in the Menu Manager.
  • Adjusted the php-files of the block and of course the asssociated module ‘td_module_mx1’
  • Adjusted styling on the ‘inner content’, and especially the ‘ajax dropdown’.
  • Added a very small jQuery script to make the ‘ajax dropdown’ immediately visible and have it set to the default category ‘All’.

Done!

The Mega Menu now exactly looks and functions like your mega menu, only with Custom Post Types!
Well, ok, I have to admit: on desktops, I need to adjust some styling for responsiveness. That’s for tomorrow 😉

I know this is kind of a hack and not ideal. I also know I should not use existing blocks and modules, but add new ones via your API. That’s also for tomorrow.

However, when I – with limited coding skills – can do this in a day, I’m sure your developers can do this in a few hours.

This was my original question: why is there support for CPT’s in all blocks, but not in the Mega Menu?
It just doesn’t make sense.

So, please make this happen.

Post count: 23312

Hello frizz77,

Please notice that the Mega-Menu feature has been designed to work as properly only with the default taxonomy which is created by default by the WordPress (category). So, the CPT has been designed to use custom taxonomy and the mega menu do not support custom taxonomy. If you want that your CPT to be displayed on your Mega menu, please notice that you will have to make the mega menu feature to works well with custom taxonomy and this task it is not a simple one, but more, it is a complex task that requires more additional customizations through code which are not covered by our support, at the moment, sorry!
Please notice that if you want to display more levels in our theme and you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you because we cannot provide customization services at the moment, sorry!

Thanks for your understanding!

Post count: 9

Sigh, you don’t even read, please see my first post: my CPT’s use standard WP categories, that is what I’m talking about. As I stated above: I got the Mega Menu working on a development site exactly as your example, but with CPT’s. I didn’t need a freelancer/developer to accomplish this, thank you very much. So I repeat: when I can do this in a day, I do not understand why you cannot do it as well.

I admit my approach is a bit of a hack and probably not the best, I’m sure you can do it in a more streamlined way. BUT, I refuse to accept that it is way too complex as you suggest! That’s just not true.

I now have the impression that you simply do not want to look into it. Every reply is: “It’s not supported, bye, bye!”
Which is totally unsatisfying.
Sorry.

Post count: 22421

Hello,
Please understand that customization is not part of the theme support as our support policy states: https://forum.tagdiv.com/support-policy-2/. We cannot allow hours of our time to only one user as we have many request per day and 24 hours to respond to all. There are 2 forums, our email and the author dashboard to answer. We simply cannot stay hours for each request in order to provide customization that is not part of the theme support in the first place. Sorry if this bothers you in any way, but this is our policy.
Thank you for your understanding.

Post count: 9

I am not asking for support, I’m asking you to include this in the next theme update, as it is a feature much sought after (seeing the many requests for this) and it is not so complex to implement, contrary to what you constantly suggest.
Thank you for your understanding.

Post count: 22421

Ok, no problem.
I will add this to our feature request list and pass this information on to our development team. Hopefully we will be able to include this in a future version of the theme.
Sorry for the misunderstanding.

Post count: 6

I just want to jump in here and add my own two cents.

I was able to sift through your theme code and modify the mega menu to support both custom post types and custom taxonomies. It took me about two business days to get it all sorted out. I’m under a tight budget though, so I have a few hacky things in place (hard-coded custom post types, the admin selection could be improved to clearly separate the taxonomies).

It was mostly just an issue with WP_Query where, instead of passing in a ‘cat’, you must nix that and pass in ‘tax_query’ options instead.

I’m not much of a WordPress developer, but I imagine that someone with more experience in WordPress and the Newspaper theme could add this feature in only a few hours. Certainly not more than a full business day.

I had originally purchased this theme thinking that it had full support for custom post types and was a bit disappointed when I had to jump in and edit code. Perhaps my vetting process was not sufficient, but your seemingly partial support of custom post types is what threw me off. More and more websites are using custom post types, so I imagine I (and the original poster of this thread) are not the only ones who would like this functionality added (to the mega menu, at least).

Post count: 9

As I wrote before “it is not so complex to implement”. However, seeing the comment above tagdiv still has not done it, 18 months after the original request.
Seems the theme ‘developers’ simply refuse.
Which is unbelievable as Mr. Bogdan B wrote: “Hopefully we will be able to include this”
Oh well, in the meantime, I’ve moved on to a better solution. Goodbye!
Good luck with the Newspaper theme ‘development’. (Or should I say LACK of ‘development’?)

Post count: 19

I cannot find those pages in the code. I’m guessing it’s an older version. Where can I find the code generating the mega menu? I can’t seem to find it anywhere. Thank you.

Post count: 35449

Hi altgirlmedia,

If you are referring to these two files td_module_mega_menu.php -> td_block_mega_menu.php thank you can find them on these paths:
-> wp-content/plugins/td-standard-pack/Newspaper/includes/modules/td_module_mega_menu.php
-> wp-content/plugins/td-standard-pack/Newspaper/includes/shortcodes/td_block_mega_menu.php

Hope this will help you!
Thank you!

Viewing 14 posts - 1 through 14 (of 14 total)
The forum ‘Newspaper’ is closed to new topics and replies.