I’ve pieced together some code I’ve gleaned from the internet: I’m trying to scan a directory to insert file names and index into MariaDB table. My last hurdle it seems is this PDO error: PDO::exec() …
Tag: php
How to setup/access page in subdirectory of separate project for a Laravel/OctoberCMS website?
I have a website running an OctoberCMS theme that I built. It’s running on a server from DigitalOcean. I need to add a separate project (namely code from Matomo analytics) on the same server and access a public page (e.g. my_site.com/matomo). I’m new enough to Laravel and server configurations tha…
Allows decimal float numbers in WooCommerce form field type number
I am making an input form in WooCommerce using a function called woocommerce_form_field() for an input type number field like below: Now I would like to be able to allow decimal float numbers to be inputed in this field. Is it possible? What should I do? Answer You need to use ‘custom_attributes’ …
Slim Php not recognizing gets
I am just starting to work with Slim PHP. What could be the reason that get is not recognized on server? This route works: it returns required text https://mywebsite/back/public This route doesn’t …
Attempting something new in WP. Issue resetting WP loop
Im working in WP and basically what I’ve got set up is some logic to create a separate carousel for each category of my blog. For each carousel im displaying the top viewed posts for each category. Each Item in the carousel has a post thumbnail, author name and author avatar. My problem(if you scroll do…
How to render Html with smarty
I’m trying to render my raw HTML with smarty. The original text contains spaces and text returns, but when displayed, HTML is shown as plain text. Also, I tried to add {$brand.description|strip_tags:’UTF-8′} as a filter for my string. But it’s only deleting my HTML. How can my smarty t…
Change product status Woocommerce in short description field
I put product status and other info in short description field on wp all import for all products like this: avaliable I want if product category is Videocards to change product status and icon to “call” insted of “avaliable” like this: call Any way to do this with custom function in wp…
foogallery php shortcode with ID taken from AFC custom field variable does no display
I have ACF custom field in posts with the gallery ID. The custom field is stored in wp_postmeta table. I am trying to execute shortcode on post page with the gallery id assigned to this post. my code: returns “The gallery was not found!” How to execute the shortcode ont the post page with the ACF …
Change order item custom meta data displayed label and value in WooCommerce Admin orders
In the Woocommerce admin screen, I’m attempting to use the order line meta data to display a button which will open up a new window with the URL of the dropship supplier. I have successfully pulled the supplier URL from the product on order and pushed it to the order line item. I am able to change the m…
Use PHP exec to execute Minecraft command
I’m working on creating my own little Website to manage a Minecraft server as fun project. Now what I would need to accomplish is being able to send commands to the screen in which the server is running. My approach to this was the following: Now that command line works just fine when i execute it in th…