All Questions
525 questions
0
votes
0
answers
300
views
FPDF for creating pdf diplomas
Before anything else, I must say I am new on building WordPress functions. I have a website with online courses. Students have to sit exams and at the end they get a score, an average of all the exams....
0
votes
1
answer
24
views
RSS Feed on Wordpress showing code (hypertext) in articles titles
The Problem:
My Rss Feed headlines have hypertext showing like <b>diving</b>
Things I have tried:
I've looked on forums and found plugins meant to solve it. Nothing worked. I have added ...
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 ...
0
votes
1
answer
236
views
Alternative Hook to the_content for Changing Background Color
I'm brand new at writing WordPress plugins and have tried to find which hook would be appropriate to use when changing the background color for front-end pages. I've tried the_content, stylesheet, and ...
0
votes
0
answers
33
views
Unpublished Pages Failing To Appear On Custom Path
The Context
I have a domain, we'll call it example.com, where traffic travelling to this domain first hits a reverse proxy and depending on the path it is directed to two different containers.
Traffic ...
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 ...
0
votes
0
answers
163
views
add a hook of Woocommerce to a plugin but it only shows and doesn't function properly
I have this plugin for my site that can verify OTP. It shows and works perfectly on the registration page.
I wanted to add the exact same field to my checkout register. I've added the hook of ...
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?
0
votes
1
answer
45
views
Wordpress default post categories meta box widget
I have a plugin that automatically selects the categories in the wordpress post editor, sadly after installing the Rank Math - SEO plugin the default metabox of the post editor has changed and the ...
0
votes
0
answers
1k
views
Fatal error "Call to undefined function is_plugin_active" each time the plugin is activated
I try to activate an extension in Wordpress, but I get an error every time I try to activate it:
Here is the problematic code:
function sta_pro_first_init(){
include dirname(__FILE__) . '/...
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, ...
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 ...
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 ...
0
votes
1
answer
208
views
Overriding a function in a Wordpress plugin
Is it possible to override a function being called by a Wordpress plugin? Working on customizing a Wordpress plugin, I need to make some changes in some code blocks. Among the most critical blocks ...
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 ...
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 ...
0
votes
1
answer
131
views
The function called on the wp head hook becomes null
Sample code:
function test_loaded() {
require_once 'file.php';
$ins = Sample_Class::instance();
require_once 'file2.php';
}
add_action('plugins_loaded', 'test_loaded');
in file.php
class ...
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 ...
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, ...
0
votes
2
answers
366
views
Hide Plugin Custom Post Type Menu Link
I installed a plugin that has a custom post type, that looks like the picture below:
WhatI's like to do is hide the "Pictures" link in this menu. It's a custom post type. The link looks ...
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 ...
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 ...
0
votes
1
answer
22
views
ACF Fields are not showing up on Homepage
I want to Customize the Yith Plugin for which I want to add some custom fields with Existing fields. I am getting fields from ACF and adding them to an array ACF Fields are showing up in Yith Setting ...
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 ...
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 ...
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?
0
votes
2
answers
2k
views
Conditional Homepage for logged in user
I want to change the home page url of wordpress site to another url when the user is logged in and have a specific role. Is this possible?
Thanks in advance.
0
votes
0
answers
24
views
How to detect 404 url and make this link underline or change background color?
<a id="block_bell" href="<?php echo get_home_url(); ?>/email-newsletter"><i class="fa fa-bell" aria-hidden="true"></i> Get New Posts Notification</a>
if this ...
0
votes
2
answers
468
views
Make modification of add_to_cart button specific to single page
I am using WooCommerce for the eCommerce part of my WordPress site.
When using the add_to_cart button I want it to say "read more" on a specific webpage only.
So far I have found the code to change ...
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 ...
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 ...
0
votes
0
answers
37
views
Search in WordPress
I created this function in functions.php:
function wpbsearchform( $form ) {
$form =
'<form role="search" method="get" class="searchform" action="' . home_url( '/' ) .
'" >
<div>...
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 ...
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 ...
0
votes
0
answers
99
views
Use buddypress function outside of plugin
I have a question regarding Buddypress plugin.
It seems that I can use Buddypress function such as bp_core_signup_user() without any declaration on other plugins.
How is it possible?
I’m newbie to ...
0
votes
1
answer
138
views
Add external javascript to post template
I want to add external JavaScript link in the custom post template. I am adding the below function in the child theme. But the external link is not loaded in the custom post theme.
Am I doing ...
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['...
0
votes
0
answers
77
views
Edit plugin function with a hook
I've just spent 2 days on trying to pass/change an argument in a plugin's function but had no luck so far. Would anyone, please, show me the correct way or solution how to do that?
I need to be able ...
0
votes
0
answers
28
views
How to disable plugin capability : "create new category"
I tested that a capability can be disabled for any user role, but I found nothing to block the capability of a plugin. Is this possible?
any help is greatly appreciated
0
votes
1
answer
3k
views
how can export data in excel file custom plugin
below is my code I need to export data with excel file
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>?page=client_plugin" method="post" name="export_excel">
&...
0
votes
2
answers
130
views
Block plugin update possibilities (but not by hiding notifications)
Is it possible to block specific plugins from updating, manually too? I don't want to block this by hiding the notification, changing the plugin version or anything like this. I'd like the ...
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') ) {
...
0
votes
1
answer
151
views
How to Unhook actions/filters in within Class in plugin
I have a business website for vacation home rentals in which the WordPress theme has its own booking system for house bookings only and it has been great!
I also, have Tour/Services (not Houses) also ...
0
votes
1
answer
54
views
Securing langugae folder
I have plugin and theme translations for my language and they work great.
I had to change some translations in a few plugins and theme per customer needs.
Today I updated WooCommerce and I lost my ...
0
votes
0
answers
90
views
Plugin function in child theme
I need to customize a message returned from a plugin function using my child theme.
In the plugin:
if ( ! class_exists( 'my_class' ) ) {
class my_class {
if ( ! is_admin() || ( defined( '...
0
votes
0
answers
35
views
post id or permalink auto-incrementing number and reset everyday
i wanna have a permalinks like this:
*.com/2019/10/02/0001
*.com/2019/10/02/0002
*.com/2019/10/02/0003
...
*.com/2019/10/02/nnnn
.
and the next they the number should be reset to 0001, and ...
0
votes
0
answers
489
views
WPML - Hook when language is switched (change user language)
I would like to change the logged in user's language (if someone is logged in) when they change the language in front-end.
I'm using the WPML Multilingual CMS plugin in my Wordpress website.
I've ...
0
votes
1
answer
120
views
Call function with button and return response
I'm trying to do the folllowing.
I have a button in my template (in templates folder of my plugin). When they press the button I want to call a function and send and id to the function.
In that ...
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 ...
0
votes
0
answers
28
views
Change custom rewrite rule when permalink is updated/changed
I have a scenario where i need to make a rewrite rule dynamic so that when permalink is changed the re-write rule should get updated as well
function rewrite_rule() {
global $wp_rewrite;
$...