## WordPress: How to write to a text file and save it in a folder for later download?

Question
I've a template file in the 'templates' folder that performs a function based on the JSON input it receives from an external source. I want to write that JSON input in a text file and save it somewhere. And then later ...
0
16 hours 0 Answers 1 views

## WordPress Real Cron Change timeout issue

Question
Im running a large script which takes approx 2-3 mins to complete. The script loops through our woocommerce products and updates them where necessary. The problem I'm having is when the CRON job is scheduled to run the script times ...
0
16 hours 0 Answers 1 views

## I want to display the sku in the product pages of my EDD website

Question
In the functions.php I use: add_shortcode( 'output_post_sku', 'get_sku' ); And retrieve it with shortcode: [output_post_sku] It doesn't work. Anyone familiar with this? Thank you!
0
2 days 0 Answers 2 views

## WooCommerce Single Product Page Variations – SKUs Duplicating / Not Resetting

Question
Discovered an issue with displaying SKUs on a Woocommerce single product page. I'm using two theme functions, the first displays the SKU in the upper description area, the second displays the SKU for the Related Products along the bottom. However, they are ...
0
2 days 0 Answers 2 views

## WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank Question I have created a rather complex WP_Query, I need to restrict the arguments that are used within the query dependant on the users inputs. I appreciate I can wrap the whole argument in an IF statement, however if I try add ... 0 3 days 0 Answers 6 views ## Can I use a function to return HTML and the result of another function? Question I have a very simple function to create a shortcode to get the name of my page. I was using this shortcode in a form, but WordPress changed the Shortcode API and that no longer works. So I was wondering ... 0 4 days 0 Answers 12 views ## Setting youtube size in functions.php Question I'm using the code below to set the width and height of youtube embeded links ////////////////////////////////////////////////////////////////// // Youtube shortcode ////////////////////////////////////////////////////////////////// add_shortcode('youtube', 'shortcode_youtube'); function shortcode_youtube($atts) { \$atts = shortcode_atts( array( ...
0
5 days 0 Answers 15 views

## How to get correct URLs in network wide menu (Multisite)?

Question
I'm using this function to switch to my main website's navigation and display it on all sub sites in my multisite network. Ideally the links should have the following format: http://www.mysite.com/navigation-link but on the sub-sites the urls are ...
0
5 days 0 Answers 13 views

## Too few arguments sent to custom function

Question
I have a button on the front end which will trigger a function via AJAX to follow another user. When the process is complete/successful, it will run one last function which is a do_action. Despite even manually passing static values, I ...
0
5 days 0 Answers 6 views

## How to change order inside foreach using wp_enqueue_script?

Question
I have a created a for each loop to load all the script files from my build folder dynamically in the footer with for development and production mode. This way I don't need to manually replace the script files. But I ...
0
7 days 0 Answers 7 views