zonnovate
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Auto adding new post categories to menuHey buddy, I managed to tinker with some code I found online to get this working.
/* Auto CPT Menu */ add_filter( 'wp_nav_menu_objects', 'wpg2byt_add_term_parent'); function wpg2byt_add_term_parent( $items) { $terms = get_terms( array( 'taxonomy' => 'wpbb_job_type', // enter the reference for your CPT catagory 'hide_empty' => false, ) ); foreach ($terms as $term) { //format its data to be compatible with the filter $link = array ( 'title' => $term->name, 'menu_item_parent' => 4533, // get the ID of your menu item with inspect element, this will make the catagories go under this as a submenu 'ID' => $term->term_id, 'db_id' => '', 'url' => get_term_link($term), 'classes' => array( 'cpt-auto-populate' ) // include a class to the newly added categories menu items ); $items[] = (object) $link; } return $items; }The only issue is this is being applied to every menu across the website, for now I am hiding the new categories on unwanted menus with the custom class.
Help from anyone to apply this code to a specific menu would be appreciated.
Hope this simple solution works for you.
P.S plugins for this suck. Usually I manage to make anything work with a plugin but this time was forced to work on my php skills which equally suck!
Forum: Developing with WordPress
In reply to: Auto adding new post categories to menuHi,
Did you manage to get it working?
I am in the same position as you and using Elementor, I would greatly appreciate if you could share your code if of course you were successful 😉
Huge thanks!
Yeh sure I don’t mind changing it, I still need to figure out how I can add the download button form to the quick view pop-up because it doesn’t seem to be working. I think i read somewhere that your not allowed to move elements to a pop-up in javascript? So do you have any suggestions about that?
Also because I have it that you need to register to download free models, how can I see what registered user downloaded what product?
Thanks, will be changing my review soon.
Sorry never mind I replaced the $ sign with jQuery and it worked, not sure why but its good now haha.
Thanks that worked great! I am trying to execute the JS code bellow that replaces the old list of files with your free download list. But I only want to execute this code if the product is free (which i do not know how to check for) or whenever your .somdn-download-wrap is visible/displayed. Because when it’s displayed that means the product must be free.
This code only seems to work when I am in the customize wordpress editor, but when I press save it doesnt work?
if ($('.somdn-download-wrap').is(":visible")) { jQuery(".block-info.mgb30.overlay_bg.pd30.list-files.btb.nitro-line .product_meta").replaceWith(jQuery(".somdn-download-wrap")); }Also how do I change the “AVAILABLE DOWNLOADS:” text? In the setting you said?
I took what you said on board and almost completely figured it out! The last thing I need to know is how to target the first “child/row” of the (form.somdn-download-form.somdn-checkbox-form.customize-unpreviewable) so I can add a border to the top of it. I tried :first-child but I think that is for lists?
I am VERY new to coding and I am pretty happy with my result so I just need the last missing piece from you. Thanks for suggesting me with idea that helped me figure it out 🙂
Here what I managed: https://dev.modeldezign.com/product/soundress-hq-soundpack/
Thanks so much!
Ok I see what you mean, so how could I move your list under the top right block that contains the title price and description. I think the name of the div is this (div.block-info.mgb30.overlay_bg.pd30.btb.nitro-line). So can you provide me with two codes, one to place your download list container under the top right block and also one code that places it inside the top right block at the bottom of it so the list will be inside the container.
Would you need my files to find a way to move it in the right place?
Thanks.
- This reply was modified 7 years, 3 months ago by zonnovate.
Thanks for the reply but the only problem is I unfortunately do not know how to edit or create template files so could do it for me and map the checkboxes to the right of the file names within the side element of the product page and place the download button where the add to cart button would be. I will also send the theme files as soon as possible.
Thanks again.
Ok I will email my theme files and database files so you can re-construct my site on your end. What email should I send it to?
As for the checkboxes, by default the checkboxes are beneath the “Available Downloads” header right? Instead it would be great to have the corresponding checkboxes next to the corresponding file name bellow the “File Included” header like in this picture. And as I said before to have the “Download” button where the “Add To Cart” button would usually go on my theme.
So the checkbox for the “Dark Stand Up Desk” that is usually bellow the “Available Downloads” would go to the right of the “Dark Stand Up Desk” box like in the image under the “Files Included” header.
Thank you for taking your time to read and hopefully you understand me.
https://i.imgsafe.org/57/57e3b1cb7a.png
Thank you,
best regards.- This reply was modified 7 years, 3 months ago by zonnovate.
Also while you are finding the fix I would be over the moon if you could map the check box button to the file name and have the download button under the description. I can do all the css styling and padding so feel free to ignore that. If thats possible please refer to the image bellow for more clearance.
https://i.imgsafe.org/57/57e3b1cb7a.png
Thanks so much again.
- This reply was modified 7 years, 3 months ago by zonnovate.
Yes sorry I made the products free now: https://dev.modeldezign.com/shop/
As for the theme I am not sure if I have the right to send you theme files, I will have to try and find out first from the theme owner. Is it necessary for you to find a fix?
Thanks for the quick reply.
- This reply was modified 7 years, 3 months ago by zonnovate.
Honestly its fine I can understand, better late then never eh haha?
I am using the Nitro theme (Digital Store). The theme it self created the quick view functionality.
So all I really need is to move the download links into the right location under the short description where the “Add To Cart” and “Buy It Now” buttons are on the normal product page of my theme.
As for the quick view similarly to the product page the download links are missing so if you could move it into place that would be great!
I can give you the admin details to my development site dev.modeldezign.com if that helps? Just let me know.
Thanks a lot for getting back to me,
best regards.