Hi, if you are not familiar with PHP programming it would most likely be the easiest for you to just purchase the Custom Fields add-on.
If pasting the code snippet into functions.php broke your website then most likely you have it pasted in an incorrect place or some characters were encoded to UTF-8 characters when copying, it is hard to tell. What was the error message you saw after pasting the code snippet?
Thread Starter
mat63
(@mat63)
Hi,
First of all, thank you very much for your answer.
So I just copy pasted the code from the github at the bottom of my functions.php and I get this error : Parse error: syntax error, unexpected ‘<‘, expecting end of file in /homepages/20/d700996654/htdocs/wp-content/themes/oceanwp/functions.php on line 778
Could you send me the exact link of the plugin you are talking about please ? Is it a plugin of yours ? I understand it will help me to produce the same research bar (seen in my other website «oc63») with the sub-sub categories on the event page ?
Thank you !
Hi, the Custom Fields add-on you can purchase here https://wpadverts.com/extensions/custom-fields/
As for the error most likely you have copied the line <?php as well, if you are adding the code to your theme functions.php file you should start copying the code from line about 9, that is
// The code below you can paste in your theme functions.php ...
Thread Starter
mat63
(@mat63)
Hi,
Argh I’m sorry for the inconvenience. Yes it works now without the first few lines. Thanks a lot !
For now, I just bought your add-on WP Adverts – Category Icons and I don’t understand why when I click on «select/upload image» nothing happens. Not even a pop-up or a error message. I tried on chrome and firefox. The same.
I put my licence number. I can only change with an icon already in the database of the plugin. I can’t put mine.
Also I would like to know if you plan in the future to allow us to put a bigger image than 64 px * 64 px because I would like to have somehow the same sizes as in this website : http://osclass.jeekapascual.com/oc63/
Thank you very much !
Hi, when editing category using Chrome click Ctrl + Shift + i it will open a developer console and should show you an error message after clicking the select / upload image button, the error you will see there you can copy and paste here i should able to help then.
Right now we are not really planning to allow different image sizes i am afraid as this would break the layout on [adverts_categories] shortcode.
Thread Starter
mat63
(@mat63)
Ḣi,
This is the error of the console I get :
term.php?taxonomy=advert_category&tag_ID=8&post_type=advert&wp_http_referer=%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dadvert_category%26post_type%3Dadvert:346 Uncaught TypeError: Cannot read property ‘editor’ of undefined
at HTMLInputElement.<anonymous> (term.php?taxonomy=advert_category&tag_ID=8&post_type=advert&wp_http_referer=%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dadvert_category%26post_type%3Dadvert:346)
at HTMLInputElement.dispatch (load-scripts.php:3)
at HTMLInputElement.r.handle (load-scripts.php:3)
(anonymous) @ term.php?taxonomy=advert_category&tag_ID=8&post_type=advert&wp_http_referer=%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dadvert_category%26post_type%3Dadvert:346
dispatch @ load-scripts.php:3
r.handle @ load-scripts.php:3
Hi, hmm this does not help much, maybe you could email me a screenshot of this error using contact form here https://wpadverts.com/contact/?
Thread Starter
mat63
(@mat63)
HI,
I really would like to thank you for your time !
Ok so I created a page especially for you with a video to show you what exactly happens. The second browser I use is Firefox
http://s700996656.onlinehome.fr/video/
By the way, is it possible to hide for now the « (X) » on the red icons. I mean because at first no one put ads, I don’t want people being discouraged because there is no adds if it’s written 0 or a small number.
Thanks a lot !
Hi, the video does not work for me, that is it has 0:00 length when i open it.
The number of items in the category you can hide using show_count param https://wpadverts.com/documentation/displaying-categories-adverts_categories/
Thread Starter
mat63
(@mat63)
Hi, thanks a lot ! 🙂
Ok so I changed the settings for the video.
This should works now : https://youtu.be/d0ZzPP27s14
Hi, please try opening a file wpadverts-category-icons/includes/class-wpadverts-ci-admin.php and inside a function advert_category_edit_meta_field add line
wp_enqueue_media();
Thread Starter
mat63
(@mat63)
Hi, Sorry but I tried to add the line in the line 98 but it doesn’t work so I’m not sure where to put exactly this line of code.
I created a github file with the file class-wpadverts-ci-admin.php so you can see where I put it.
I’m really sorry I’m a newbie in coding…
https://gist.github.com/Matthieu63/968b7f9f9f961b7b980e514edc2e8bb7
But weird why does this problem happens to me ? Have you ever encountered this kind of problem ?
I’m really sorry to take your time that much.
Thanks a lot in any case !:)
You need to add this line before ?>.
Thread Starter
mat63
(@mat63)
Ah yes it works ! Thank you very much 🙂