Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
2 answers
2k views

How can i change an image's author?

Is there any function to change the image Author(Uploaded By) in WordPress library?
Tarek's user avatar
  • 33
0 votes
1 answer
449 views

Modify function output in a plugin

I am trying to update one my plugin functions using add_filter with the ultimate goal of changing the order of elements that are output by the plugin. Here is the plugin function: public function ...
lushiris02's user avatar
0 votes
2 answers
3k views

Wordpress checkbox and Illegal string offset

I'm using the following code to determine if a checkbox has been ticked and then display some text if it has/hasn't as a test. When its checked, it works fine and the text displays. When its ...
Jason's user avatar
  • 103
1 vote
2 answers
436 views

Using a post-signup hook to get user details

Update: I got this working with a different hook user_register. It looks like wpmu_activate_user was never triggering. I would still like to have this happen after the user verifies and sets a ...
Joseph Berry's user avatar
0 votes
1 answer
2k views

Difference and examples of esc_attr__() and esc_attr_e()

I want to know what is the difference between these functions. esc_attr__() and esc_attr_e() What would be an example of use, when they are recommened to use them.
Learning and sharing's user avatar
0 votes
0 answers
63 views

Creating an array from form inputs before it is posted to the options database

I am creating a plugin and I want to be able to have the user input a starting number and ending number from an options page. When they submit it I want to create an array of the numbers (example ...
acray's user avatar
  • 1
0 votes
1 answer
454 views

Custom post type's posts are not showing anywere but in xml sitemap

I don't use any cache plugin. Custom post type's posts are only showing in xml sitemap but not showing in other places on the site, until I "open each new post url manually" or "use a third-party ...
proseosoc's user avatar
  • 117
0 votes
1 answer
1k views

Add action to custom Function

I am trying to use plugin action in my custom function. Plugin is adding an action to wordpress registration form add_action( 'bp_before_account_details_fields', 'tv_bp_avatar_upload_form' ); But i ...
Bushra Shahid's user avatar
1 vote
1 answer
6k views

custom post type not showing in menu

I have created a simple plugin to manage my portfolio as a custom post type. everything is OK and works great, but there is no ability to add my custom post type to the menu(also for its taxonomies). ...
Ali Qorbani's user avatar
0 votes
1 answer
368 views

How use get_plugin_updates() function?

i want use this function to take some info, but how can i take the data i need? for example for wp_get_data() i do this $example = wp_get_update_data(); echo $example ['title']; or echo $example['...
Beppe's user avatar
  • 3
0 votes
1 answer
171 views

Shortcode Attributes to Return different $_POST

I am creating a solution to enable front end editing of custom fields, I am using hidden input containing the custom field to send via POST request to an editing form, the form contains default value ...
Ali Hamdan's user avatar
0 votes
1 answer
201 views

How to create algorithm for ordering posts in Wordpress?

I have a news feed in my website where all the blog posts are displayed. Wordpress default is to dislay these in order "latest first". Using Elementor and Likebtn I have learned how to order ...
raen's user avatar
  • 1
1 vote
0 answers
346 views

Adding a new field to the address field type in gravity forms

I'm following the documentation for adding new address types in Gravity Forms located here: https://docs.gravityforms.com/gform_address_types/ My goal is to add a new dropdown for County where State ...
o_O's user avatar
  • 279
0 votes
1 answer
298 views

Return multiple values ​in a shortcode attribute

Today the shortcode I created below is working normally if I pass only one value, however, now I am trying this shortcode so that the attribute can receive multiple values. The idea is for the ...
Renan Bessa's user avatar
2 votes
1 answer
4k views

Set a User as Author of all 'New Posts' posted

An Author 'XYZ' is need to be set as the Default author of all New Posts. Irrespective of the actual Author posting the content, the post should be saved by this author 'XYZ'. Is there a Plugin or ...
uzair's user avatar
  • 261
0 votes
0 answers
163 views

Cannot pass value variable to WP AJAX functions

I create plugin to create wizards using jquery steps. I save all step's values into variable and using ajax to process it, then show using wp ajax function but only one variable in ajax inserted into ...
Baim Whello's user avatar
1 vote
2 answers
4k views

Inserting HTML tag with ACF into shortcode

Let me start off by saying that I usually make alot of research before asking publicly for help - due to likelyhood of information already being on the web - altho I've done several days of reseach ...
Pr0metheus's user avatar
0 votes
1 answer
125 views

Adding discount functionality to the cart

Hey guys :) I'm trying to implement a custom discount rule to the cart. Basically there is WooCommerce and the site is selling t-shirts. There is a current promotion that if you buy 3 t-shirts, you ...
tsvetko.krastev's user avatar
0 votes
1 answer
32 views

Need to replace Currency Shortforms

I want to replace the currency shorten alphabet, it is currently in M, L and So on. I want to change to indian currency number format like K, L and CR below is code: if(!function_exists('...
Vijay Patil's user avatar
2 votes
2 answers
3k views

Change destination author link

It's possible change the destination of the normal author link to a post page or other link inside the website? I have found this answer but needed do buy php code. Is possible found easier way, form ...
Marco Romano's user avatar
0 votes
1 answer
650 views

Cookie value changes back to previous value after changing

I have this custom pligin that im using in order to save the user's language preferences. I store it as a cookie like so: <?php add_filter( 'init', 'aws_set_language_cookie', 999 ); ...
user206592's user avatar
0 votes
1 answer
82 views

Is there a best practice remediation for PhpStorm's warning that void function the_post_thumbnail is used?

In a plugin I'm working on there is a line: echo the_post_thumbnail(array(155,55)); It throws a inspection warning: 'void' function 'the_post_thumbnail' result used Is there a best practice ...
davemackey's user avatar
0 votes
0 answers
48 views

function post to trash problem

I know that are some questions like mine BUT I did not find solution for my problem! I try to create for client an auto post expire for custom post type called “event” that when a new post is created, ...
Lefteris's user avatar
0 votes
1 answer
726 views

Checking the count within a foreach loop

I have made a function for use in my breadcrumbs. The breadcrumb displays custom URL's for certain taxonomy categories. It works wonderfully, however, I need help if the post is filtered under ...
Joe's user avatar
  • 169
0 votes
1 answer
9k views

Image change on hover

Is there any way to have an image change on hover (from image a to image b) in wordpress? I wonder if there is a plugin or a custom function I can use to perform this. P.S. -It is not a featured ...
Pragmaticoder's user avatar
0 votes
2 answers
98 views

wordpress Shortocode running twice?

I developed a plugin for my citrus payment gateway.I created a shortcode to manage it. It was running absolutely fine some days ago.Now I don't know who changed what, now that shortcode is running ...
raj aryan's user avatar
0 votes
0 answers
49 views

How to copy the all Wordpress media items to another custom plugin folder?

I created a custom plugin to compress/zip all media items in a folder for that I create a plugin and inside the plugin, I create a folder. Now on that folder, I want to add/copy my all WordPress ...
Avinay Quicktech's user avatar
2 votes
2 answers
7k views

WordPress ajax call for not logged in users, doesn't work

I have on frontend search box, I have implement autocomplete for it, and when I'm logged in, it works great for me. But when I'm not logged in, I get 302 as result of ajax call, response headers have ...
user1147's user avatar
  • 802
0 votes
0 answers
31 views

how to define a html folder to make it work with WordPress commands

so is it possible to define a folder outside the wp-$folders ? i created a html page and i want to use WordPress hooks and filters in it simply the WordPress PHP syntax im still learning php - and i ...
mok's user avatar
  • 1
1 vote
2 answers
8k views

How to create TEMPORARY Download links in a wordpress POST?

I'm creating a WordPress blog with some members-only page. In those members-only posts I have my own tutorial download links which i have uploaded for FREE. Problem is I want them to stop sharing the ...
mCrazy eng's user avatar
1 vote
2 answers
11k views

How to get subscription key or id using Woocommerce Subscriptions [closed]

I need to get the subscription key of a particular subscription to pass into a custom function. I have referenced the documentation where it shows how to get the key, but I have failed to integrate ...
nerdalert's user avatar
  • 131
0 votes
1 answer
1k views

How to make the first letter of a post title uppercase, in a plugin?

I'm making a plugin that makes the first letter of the first word in a post title uppercase, if it was lowercase. I'm a beginner, so it's simple, but even so I struggle! The plugin can be activated ...
user avatar
1 vote
3 answers
101 views

Display a text message if the field is not found and not if found

I am trying to display a message like "Sorry no information here" if a field is not found and if field is found, no message should appear. I am using the ACF plugin for displaying fields on the front ...
Nicolas Logerot's user avatar
0 votes
2 answers
1k views

Getting a ressource ID, from a WC_Order_Item_Product/Order

I have been trying to figure out how i get the ressource on a WC-order, from the product line data, but i seem not to be able to figure this out in WC 3.0+ - pre that it was pretty easy. I have looked ...
Mac's user avatar
  • 313
-1 votes
1 answer
753 views

Wordpress function to add text

I m using this simple function to add text to my wordpress site post ! add_filter( 'afip_new_post_content', 'myprefix_change_afip_post_content', 10, 2 ); /* Grabs the image source for the newly ...
pradip's user avatar
  • 70
1 vote
2 answers
6k views

Shortcode display outside the div

I have created a shortcode that retrives and displays a form.The content of the attribute in HTML. function check_my_login( $atts) { return '<form action="" name="" method="post" ...
Pavnish Yadav's user avatar
1 vote
1 answer
493 views

Change wordpress current_time function to different timezone

I'm using plugin to set the earliest possible date for order delivery in woocommerce. Piece of code below: $current_time = current_time( 'timestamp' ); if( $prdd_minimum_delivery_time != '...
Łukasz Gręźlikowski's user avatar
1 vote
0 answers
2k views

Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()

I am using a modified version of the Social Activity theme from CMS Masters, and was trying to change the hardcoded versioning of the stylesheet in the header in order to reflect CSS changes I made. ...
Yami Medina's user avatar
0 votes
1 answer
3k views

how to change wp-admin url using function file

function go_away() { wp_die( 'Nice meeting you, byebye.' ); } add_action( 'login_init' , 'go_away' ); add_action( 'admin_init' , 'go_away' ); hello i am using this code to lock admin of wordpress ...
neil's user avatar
  • 23
0 votes
1 answer
61 views

Attempting to list all product categories and the price range of all products within them

I'm trying to display a list of all product categories and the price range of the products within those categories. E.g Headwear – £30-£150 Shoes – £35-£300 Where "Headwear" is the Product ...
Joe Sturgess's user avatar
0 votes
0 answers
28 views

How to add specific script to WordPress webpage that will working with user input and databases

We are new to WordPress and want to create Website that will be taking user input, running specific script through databases using that input and then outputting specific results on the web-page or ...
Farid644's user avatar
0 votes
1 answer
502 views

Configuring default woo commerce login with modal popup

Good day. I was trying to configure the default woo commerce login page. I want to add the two contents (login) and (register) to a modal popup separately. let's say if the user is not logged in and ...
qierto285p's user avatar
0 votes
0 answers
163 views

Execute function activate/deactivate plugin in specific pages

Good evening, I'm not a php developer but I wrote this script (tested and fully working): function deactivate_plugin_conditional() { if ( is_plugin_active('plugin-name/plugin.php') ) { ...
Alessandro Valori's user avatar
6 votes
2 answers
20k views

Remove Google Fonts Which Are (Probably) Added By Plugins

I've a theme which loads 'Open Sans' from Google Fonts. Our site is using SSL & we're using a $protocol:// to render the font URL However, I noticed that, some plugin/(s) probably adding 3 ...
tushonline's user avatar
3 votes
4 answers
373 views

Use functionality of 2 wordpress plugins

I would like to do the following: Registered users in my wordpress application can receive messages. They can choose to receive messages in the following ways: The Wordpress application (Inbox ...
nielsv's user avatar
  • 173
0 votes
2 answers
3k views

How to prevent page load on form submission

I have finally managed to get my plugin working. However, upon submission the whole page reloads along with my output above the form. How can I avoid my page to completely reload and not to display ...
Himanshu's user avatar
0 votes
1 answer
55 views

How to get specific string/value from an array? php [closed]

I am creating a custom wordpress theme and i am little stuck in one situation. I created an array $ark and get some values in it <?php $ark[] = esc_url( add_query_arg( 'pdff', $post->ID ) ); ...
Jain's user avatar
  • 29
3 votes
1 answer
8k views

Generate Advanced Custom Fields box in custom admin menu page

I have created an custom admin menu page called FCC Youtube with add_menu_page function which has some custom fields I manually generated via HTML and PHP: code ( just the part how I created this ...
Ray Tsai's user avatar
0 votes
1 answer
55 views

Sharing varible between two add_actions

I'd like to share a variable between two add_actions. Currently I'm trying to use a global. However it doesn't work. This simple example below illustrates the problem. In this example, ...
Scott Paterson's user avatar
1 vote
3 answers
311 views

Limit the number of plugins that can be installed in a WordPress installation

I know that is not the number of plugins, it's the quality. But anyway, I want to limit the number of plugins that can be installed on a WordPress installation. Any ideas? It doesn't matter if the ...
drabello's user avatar
  • 403

1 2 3
4
5
11