Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
89 views

stop resize button for wordpress media

The images in my WooCommerce product gallery do not need to be resized I only need the original image to display. Is there a way to add a toggle button to wordpress media to tell it to generate other ...
Monoor's user avatar
  • 13
0 votes
1 answer
69 views

Mixed results with is_page() WordPress function, when using $this, or self

I'm converting an old plugin from PHP5 -> PHP8 and I came across this check, which caused an error when executing: Notice: Accessing static property PropertySearch::$listing_details_template_name ...
level42's user avatar
  • 113
0 votes
1 answer
27 views

CPU Overloading due to some hooks

I have some functions restricted in some hooks. The purpose of these hooks was to have consistent author name in the DB(which is a product attribute) and also update the display name. I placed this in ...
Varun Muchanapally's user avatar
0 votes
1 answer
23 views

Read page- or post-content across different builder-plugins

I am currently working on a WordPress-plugin to analyse post- and page-content. The plugin contains a php-function that read the post- and page-content across several different builder-plugins (such ...
Dennis's user avatar
  • 103
0 votes
1 answer
42 views

I want to allow certain file types on dokan upload files

Before we get started, I have tried alloweding "UPLOAD_UNFILTERED_FILES" thing on config.php and i have tried allow different mime type plugins, none of them worked I want to allow .rbxlx, ....
ItsBenny_'s user avatar
0 votes
0 answers
26 views

Wordpress Convert queries to slashes using function.php

Please check and explain why this wordpress rewrite rule isn't still working. function myplugin_rewrite_rule() { add_rewrite_rule( '^music/record-year/([^/]*)/?', 'music/?record_year=$matches[1]','...
John Ovye Godwin's user avatar
0 votes
0 answers
21 views

How to change all the urls of the WordPress site?

We have created an online store with WordPress on a domain and now that we have finished testing, we must take it to the final domain. I only need a method to change all the URLs of the site I have ...
Estudiante's user avatar
0 votes
0 answers
61 views

WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)

My website doesn't display pagination no matter what I do or try. Can you help me, please? Tried a lot of different codes and Plugins but no dice. Here is the code for test template: <?php /* ...
gfo95's user avatar
  • 25
-1 votes
1 answer
58 views

Make plugin admin page visible to other roles

I have created a plugin that I want users with the role of 'Editor' to be able to see and use in their admin panel.Currently, only administrators can see and use this plugin. I believe it has ...
Pelle Nilsen's user avatar
-1 votes
1 answer
363 views

Option value not getting updated until page refresh in WordPress

I am building my WordPress plugin. There, at first I am using a checkbox, and then updating the value from the checkbox (yes or no) in the Database. Then, from later on I am fetching the value form ...
Rajin Sharwar's user avatar
0 votes
0 answers
13 views

Selected dropdown option is not getting saved in the DB [duplicate]

I am building a function within my plugin where I have the list of available pages being displayed. What I want is for whenever a user selects a page from the dropdown, it should save the slug of the ...
Rajin Sharwar's user avatar
0 votes
1 answer
77 views

How can I save the selected page in the dropdown after anyone clicks on Save Changes?

I am trying to build a function for my plugin. Now, I am displaying the dropdown of all available pages. What I want is for when anyone chooses a page from there and clicks on Save Changes, the page ...
Rajin Sharwar's user avatar
0 votes
1 answer
91 views

PHP Creating a formula from mysql db values and db stored math operator

I am trying to use variables stored in a DB and math operator (e.g. * + - /) to allow users to build formulas e.g. (Night Shift Hours*Night Shift Time Rate)*0.2 The formula string is build from ...
GURU mcewan.marriott's user avatar
1 vote
2 answers
604 views

Scope for PHP Variables Assigned in functions.php or a plugin

I'm a web developer who works on WordPress sites and want to ensure I keep PHP variables out of the global scope. I have questions about this: If I created a $new_title = "test seo title"; ...
risingPhoenix1979's user avatar
0 votes
1 answer
213 views

Checkbox show / hide output result

How can i fix a show / hide function in my plugin. The checkbox called "snup_check" at line 257 should be standard unchecked. If the checkbox is unchecked nothing should happens. If the ...
bjovaar's user avatar
  • 21
0 votes
1 answer
47 views

What is @Action in Wordpress?

I have found this code snippet on a plugin. /** * @Action(name="workforce_content_loop_before", priority=10) */ public static function show_breadcrumb() { echo do_shortcode( '[...
Avijit Palit's user avatar
0 votes
1 answer
173 views

Custom Logo Link WordPress

I am trying to change the logo link of my wordpress website. But I am unable to achieve it. I am using child theme and using the code. function crunchify_custom_logo_url ( $crunchify_logo_html ) { ...
Arbab Ali's user avatar
0 votes
1 answer
73 views

Wordpress Custom Hook with Class method

The code described below works normally outside of wordpress, but in wordpress I get "warning expects parameter 1 to be valid callback function mycars ($ mycarsclass) not found". If I remove ...
deki0's user avatar
  • 1
0 votes
1 answer
113 views

How to get current cart values using WC_Shortcodes?

I am trying to get current cart items from my own plugin using WC_Shortcodes::cart(); this will return cart details in html format. WC()->cart->get_cart(); code not working. i need only cart ...
Haja's user avatar
  • 3
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
1 answer
402 views

WP Function does not trigger on Webhook API Call

I have created a function that triggers and connect parent post with Child post based on a Custom Meta Field value. If Meta field value of an existing Parent post matches with the newly created child ...
Manish Bajpai'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
1 vote
0 answers
70 views

How to enable specific plugin only based around shop manager role?

I have created a nice clutter free dashboard for the shop manager role which gives permissions to edit, maintain the store and hidden unnecessary junk i.e widgets, updates etc The problem: The current ...
dannyhere_86'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
54 views

Is there any way to sync Facebook Comments and with comments on WordPress website?

I want to sync all comments that are done on Facebook posts on the Facebook platform with comments done on my WordPress website. Suggestions for how to go about doing this?
Christoffer Sundqvist's user avatar
0 votes
1 answer
1k views

wp_dequeue_script for a Plugin

I am trying to remove a line of script in the footer of my page that a plugin is inserting on pages that I am not using the plugin at, homepage for example. I am using the below code for some reason ...
user200552'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
0 answers
266 views

Override Plugin Script Fucnction in Wordpress

I don't know how to remove a specific function from a plugin. My plugin is Photo-gallery. I want to remove this function: function spider_createpopup(url, current_view, width, height, duration, ...
Ioflvoe89's user avatar
0 votes
1 answer
51 views

wp_enqueue_scripts

How to remove <link rel='stylesheet' id='geowidget-4.5-css-css' href='https://geowidget.easypack24.net/css/easypack.css' type='text/css' media='all' /> in only for front-page and products ...
Kacza's user avatar
  • 3
0 votes
0 answers
26 views

Share my WordPress plugin for updating how?

I have programmed my own WordPress plugin for the first time. I would like to make my plugin available to my customers, but I would also like to release updates to my plugin. How can I do that? How ...
managmedia's user avatar
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
0 votes
0 answers
73 views

Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?

My employer has over a dozen WP sites, and we keep creating more. I decided to develop a plugin with all of the functions, etc. that we use across all the sites. We also use 3rd party plugins (such as ...
Michael's user avatar
  • 281
0 votes
0 answers
101 views

adding dynamic/multiple slug values in 'option_none_value'

I am working on a wordpress website and i am little stuck into one situation, what i want is that to add multiple and dynamic slug values from job listing taxonomy, right now i have to manually insert ...
Jain's user avatar
  • 29
0 votes
2 answers
945 views

get specific value of a array | PHP

I am creating a custom word press theme and i am little stuck in one situation, what i want is to echo the specific values of an array in the form of bordered tables. For example i want to display | ...
fyn matt 881's user avatar
1 vote
1 answer
104 views

Shortcode button dosent work for all posts. Work for first post only

I am creating a custom wordpress theme and i am little stuck in one situation, Actually i added a download link button and add some Java Script on it. The button on all posts showing and downloading ...
Jain's user avatar
  • 29
3 votes
1 answer
2k views

Can we completely remove the WordPress Sitemaps (WordPress 5.5)?

I have been using my WordPress site to create various types of content, I obviously submit my sitemaps to Google for getting my site indexed. But there is some content which I don't want on Google, ...
Aditya Agarwal'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
0 votes
1 answer
200 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
0 votes
1 answer
27 views

Submitting form to PHP

I am submitting a form to PHP edit post metadata. The logic I built is having multiple "ifisset" to execute different parts of the requirements based on the inputs. There are 4 issets, the ...
Ali Hamdan'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
17 views

How to assign a specific service to a specific provider based on location

I’m looking for a way to assign a specific service to a specific provider based on location. I’m currently developing a website with various service providers providing the same service. Do we have a ...
Omar Altahineh's user avatar
0 votes
0 answers
16 views

Precheck fields when I add a new post

Precheck fields (like categery or custom fields) in new post based on user id. Its possible to make this?
Jose's user avatar
  • 1
0 votes
2 answers
1k views

How to make a dynamic css class whose name changes every visit to confuse scraper

I want to make the page classes changed dynamic depend on time or anything else to force the type of scraper that depend on my site classes or the classes like content, entry-content .. etc. How can ...
Muhamed Ahmed's user avatar
0 votes
1 answer
122 views

front end editor creation for Restropress plug in - displaying information from a WP admin area, on a different URL

I dont know where to start on something I am trying to do other than by asking the question. Please forgive my newness. Thanks in advance - I have a REstropress WP plug in that shows some order ...
brett m's user avatar
0 votes
1 answer
196 views

Get Shortcode output to database for static post_content

my simple shortcode retrieves a list of articles as text files from a folder. These articles are in html format (with h2, p ...). I use a plugin which creates the pages I need on the fly in which I ...
Codepix's user avatar
2 votes
1 answer
279 views

HELP: Integrating WP with raw PHP code once published button is hit

Hello guys let me just open up, I am not good in both Wp coding, I will like to integrate my wp site so that once the published/update button is hit, it will automatically import external mp3 file to ...
XATA's user avatar
  • 67
1 vote
1 answer
2k views

Plugin onclick button activate other plugin

I have some code that have a button in the backend page. I want to click on the button and have it activate a plugin that's already in the plugin's directory. Here's the code: <?php add_action('...
MarkBill3000's user avatar
0 votes
1 answer
43 views

working code, not working - Plugin Dev

I have been adding customization straight to the theme's functions.php and also a little bit of CSS for a pricing table in Appearance --> Customize --> Custom CSS.. So I've decided that all ...
Cullen Carstens's user avatar
0 votes
1 answer
31 views

Easiest way to load/fire a handful of functions, IF checkbox is checked?

I have a custom checkbox field on the general settings of my Woocommerce products. I also have 5 or so functions that all do what I want them to do. These are currently housed in my child theme's ...
Chaz Pierce's user avatar
0 votes
1 answer
2k views

Wordpress Stock Update Programatically

I'm trying to develop a plugin that would update the stock quantity of products to 0 (Out of stock) that are older than X days. The logic that I'm using is: Select products who's modofied date is ...
Harry's user avatar
  • 111