Show taxonomy in custom post type "Download" Post
-
Hey Team,
I am trying to fix ths problem a long time so i hope you can help me.I use CPT UI with Search & Filter Plugin, to get a better Filter System.
My Website is based on downloads, thats why i use the WordPress Download Manager.Everything works fine and it fits perfectly.
Now after searching for a document and openig it, i wan′t to show the active Taxonomys, that are assigned to the download. (Post)To get the values into my template, the download Manager team told me to use that code:
https://www.wpdownloadmanager.com/doc/filter-reference/wdm_before_fetch_template/<br /> <?php<br /> add_filter('wdm_before_fetch_template','my_fetch_template',10,1);<br /> function my_fetch_template($vars){<br /> //your code here<br /> $vars['Versicherer'] = "Versicherer";<br /> $vars['Versicherer'] = callback_function();<br /> return $vars;<br /> }<br /> ?>
With that code i am able to put [Versicherer] into the template html and than it should show the active Taxonomy, wich in this case is”Versicherer”. All createt Taxonomys are assigned to the WordPressdownloader Manager Post Type.
But after editng the function.php. and Template html. i got the this error:
Fatal error: Call to undefined function callback_funtion() in ….funtion.php on line 6.
It put the code at the top of the funtion.php, so the error is assigned to line 6 , like it the postet code.I think the problem is, that the taxonomys are not reachable for third party plugins.
So i found that on your website:https://github.com/WebDevStudios/custom-post-type-ui/wiki/Custom-Post-Type-UI-Action-and-Filter-Hooks
_________________________
cptui_user_supports_paramsSince 1.0.0
Filters custom supports parameters for 3rd party plugins.
Parameters:
array $value Empty array to add supports keys to.
string $name Post type slug being registered.
array $post_type Array of post type arguments to be registered.Default value:
empty array
__________________________But i have no idea how to set up the code. Could you help me out?
Greats
WEBSITE:
https://versicherungsbedingungen-online.de/suchseitePLUGINS:
Wordpress Download Manager
https://www.wpdownloadmanager.com/
Search & Filter:
https://www.designsandcode.com/wordpress-plugins/search-filter-pro/
- The topic ‘Show taxonomy in custom post type "Download" Post’ is closed to new replies.