I am using a WordPress Form Plugin to store data. There’s this text field which I’m using to store links such as http://example.com. I want to make the links clickable and where possible change it …
Tag: wordpress
WooCommerce – How to insert icons before delivery method
Good day, Could anyone please help me how to insert icons before delivery method? I use this filter This works normally for local pickup and Zásilkovna, but not for the last two. I found the id I have with them at the value “value” in the input. Would anyone know how to help me? Or how to do this …
WordPress Homepage won’t show new blog post in visitors
I am facing a problem where new blog posts won’t show up on the homepage of the site. The website is running with the latest PHP and in WordPress powered by Plesk in a VPS server. Here’s what I’ve tried so far: Deactivate and even reinstall all plugins. Deactivate and even reinstall the them…
Add result of php function to WP database
I have the following function to create a member_id: add_action(‘user_register’, ‘generate_member_id’); function generate_member_id($user_id){ $unique_id = 1000 + get_current_user_id(); $…
How to use str_replace in PHP so it doesn’t effect html tags and attributes
I want to change some words (random word leaving first and last word) in page in WordPress . For example Team will be Taem, Blame will be Bamle. I am using str_replace to acheive this with the_content filter The issue I am facing is when I run str_replace it also changes text in links and classes of HTML. I j…
WordPress media library broken after uploading PDF
I uploaded multiple PDF files to a wordpress site i take care of. I used the admin-dashboard to upload those. So here is the problem: Anything worked fine before hand, I did not change any plugins nor …
How do I set custom product meta on a new product using WooCommerce Core?
I’m adding new products (car listings) to my WooCommerce shop in bulk in PHP. I’m looping through rows in a custom data table and adding them as WooCommerce products. I’m able to save each product and …
How do I add page to wordpress website and giving it a specific short code via custom plugin
I have made an action that allows a page to be made if the switch in the setting is checked. After it is confirmed it’s checked it does create the page, but without the template added. How do I get my template to work? This is what my template page looks like in the plugin. Answer In my case, I
WooCommerce Order Export: Get custom data per line item
I’m using the “WooCommerce Customer / Order / Coupon Export” plugin to export my orders as a CSV file. I’m exporting the orders in a one row per item format. This means that every order has multiple lines. One line per order item. Now I want to add some extra data to every line item. F…
add_submenu_page in WordPress
When using the add_submenu_page to create a new submenu in WooCommerce, I get “Cannot modify header information – headers already sent”. The add_submenu_page is as follows: Changing that to the following removes the “Cannot modify header information – headers already sent” …