Hi there!
I love the way megamenu looks with post categories, but I don’t like the fact that when you click on the name of the category on the left side of a megamenu, it takes you to an empty page with just the posts on that category. I’ve made nice custom pages that are much better than simply a collection of the posts in that category, and I would like to link to those. Is this possible with custom coding? If so, where?
http://httvus.net/en/ –> the “original shows” menu item at the top, when you click on the category of the show, I want it to go to the static description page for that show.
Thanks for your help!
Hello jorbified.
If you want to modify a sub-menu, you can link it to whatever you want with the custom link widget: http://screencast.com/t/y6rLoyVr4z
If you want to change the links in the mega-menu to static pages, you will have to modify the core files of the theme here: http://screencast.com/t/7IiQqadNWq
Thanks!
Thanks for your prompt reply Bogdan!
For the sake of clarity, I want to change these links on the side to static information pages, while keeping the video content as it is (generated automatically from post categories): http://www.screencast.com/t/MIyGRNhy2iC
Not the links to the videos themselves. Is that the line you pointed towards, or is the line a few above which also generates links?
Thanks!
Hello,
I understood the request. On the same line I pointed out, the link is generated automatic for all subcategories. http://screencast.com/t/iIlQXzgRc8
You need to change that function with your own custom one so it can generate a link to your pages.
You will need a bit of coding know-how to get this done because it will be no easy task. If not, you can hire a freelancer to do it for you, as we cannot offer custom work. Sorry!
I hope this points you in the right direction.
Thank you!
Appreciate your answer! I have one small question, but if it’s too specific please ignore this message. If I know the proper variable, I can do it myself. I know that $td_category->catID is the cat number (ie 62), and that get_category_link returns the full link (ie http://httvus.net/en/category/episodes/crepisodes/), but in $td_category, is there a value for just the last part of the link, in this case, just “crepisodes”? If I have that, it would be very easy for me to generate the proper static links.
Really appreciate your help!
Ross
Hi,
You could use try one of it’s parameters, use print_r($td_category); to find the contents of this object – http://screencast.com/t/uWn7dnK3kPzM – http://screencast.com/t/9UkpQsG0pp
print_r($td_category);
echo "<br /><br />";
Once you’re done remove or comment the print_r and the echo.
Thank you!
-
This reply was modified 10 years by
Emil G.
Can you please help. I’m not sure what code I need to replace to redirect the category within the Megamenu to a static page. My static page is http://biz190.inmotionhosting.com/~segund7/mucho-gusto/.
This is what i got when I ran the print code.
WP_Term Object ( [term_id] => 45 [name] => Mucho Gusto [slug] => mucho-gusto [term_group] => 0 [term_taxonomy_id] => 45 [taxonomy] => category [description] => On each category you can set a Category template style, a Top post style (grids) and a module type for article listing. Also each top post style (grids) have 5 different look style. You can mix them to create a beautiful and unique category page. [parent] => 44 [count] => 11 [filter] => raw [cat_ID] => 45 [category_count] => 11 [category_description] => On each category you can set a Category template style, a Top post style (grids) and a module type for article listing. Also each top post style (grids) have 5 different look style. You can mix them to create a beautiful and unique category page. [cat_name] => Mucho Gusto [category_nicename] => mucho-gusto [category_parent] => 44 )
Hello marcop,
Please notice that all the above explanations are only for advanced users. If you are not aware of the steps in this regard, please consider hiring a freelancer/developer to helps you because we cannot provide customization services at the moment, sorry! Another possibility for you would be to try to make a 301 redirect from WordPress, according to this documentation, here -> http://www.inboundnow.com/how-to-properly-set-up-wordpress-301-redirects/
Thank you for your understanding!