Browsing Category

Wordpress functions

Parse error after modifying the template menu

I made an edit in the template’s functions.php and now I can’t access my website. I know I have to fix the problem from the

Store [‘file’] key of wp_upload_bits() function - directoryiterator problem

I am having problem saving the file path using wp_upload_bits() $upload = wp_upload_bits($_FILES['transparent_1']['name'], null, file_get_contents($_FILES['transparent_1']['tmp_name'])); $file = $upload['file']; update_post_meta( $post_id, 'transparent_1_file', $file); At this point

wp_upload_bits() - directoryiterator problem

I am having problem saving the file path using wp_upload_bits() $upload = wp_upload_bits($_FILES['transparent_1']['name'], null, file_get_contents($_FILES['transparent_1']['tmp_name'])); $file = $upload['file']; update_post_meta( $post_id, 'transparent_1_file', $file); At this point

Function to display DWQA answer meta within questions list.

I am using DW Question and Answer plugin. I want to display the answer meta (ie info about the author of the answer to the

Restrict php direct file access but use that url in feed

i have PLUGIN file in which i pass a QUERY and retrive data from it but how to use that same file not allowing direct

Include Avada-formatted post in PHP template?

I’m using the Avada (Theme Fusion) theme. I’ve got a non-Avada PHP page template that I’d like to use for a page, and I want

How to add Woocommerce Reviews via a script?

I tried searching but I have 2 different systems via which I get reviews for my products. So is it possible to create a script

Plugin development: should I always use a Class structure?

I’ve been developing plugin using a class structure for all of my functions and to follow OOP. However, if I am developing a plugin that

Investigate: why aren’t my images having dimensions set?

After successfully getting a custom function (thanks Nate) to insert the width/height attributes to any images that don’t have dimensions set, for some reason, my

Set widget instance to a variable

I am creating a widget that handles order numbers. The basic structure is as follow: // pretty generic widget functions public function widget($args, $instance) {

How to put a variable in a instance in the widget

I am confused about how to save a variable as an instance in wordpress widgets. For example, the regular way is to ask for an

Print Dashboard submenu name and filename

Similar to my previous question, I want to print a list of all of the submenu items in the Dashboard like so: Updates > update-core.php

How to make 2 similar functions more efficient

I have 2 functions that are very similar, one for the plugin upgrade process, one for the plugin activate process - I have the both

How do I find images with no dimensions set?

Backstory Using the WordPress the_content tag, I am running a custom function to search for all images that do not have a width and height

Insert width & height attributes to all images displayed on each page

Using the WordPress the_content tag, I am running a custom function to search for all images that do not have a width and height attribute

Where to store credentials used in a function?

I am writing a function in functions.php under my theme. The function contains a cURL command that uses credentials like “account_id” and “password”. These credentials

Back to Top 107287 wordpress questions, 32 Wordpress answers.
Wordpress related, All rights reserved
Powered by Creative Advertising