All Questions
Tagged with theme-development plugins
273 questions
0
votes
0
answers
23
views
How can I keep a WordPress dropdown menu open when navigating to a child page?
I'm using WordPress with the Astra theme (free version), along with Elementor Header & Footer Builder (free version) and the WP Mobile Menu (free version). I've set up a dropdown menu, but it ...
0
votes
0
answers
26
views
Wordpress search every time shows no search found even data exists
I am using wordpress. What I am doing is, that when the user enters anything then it will search from the post and will show the result.
I have added static content $_REQUEST['keyword']="team&...
0
votes
0
answers
20
views
Frontend Enqueued Files in the Backend
I am currently developing a plugin and I need to get the handlers of various enqueued files in the theme. I have tried working with global $wp_scripts and global $wp_styles, but I only get the scripts ...
0
votes
1
answer
55
views
How to create new title and its description inside a section in WP Customizer?
Actually, I want to add a new title General settings with a small text description of it in a new section that I've created in the WordPress Customizer.
The section is already created and works well, ...
0
votes
0
answers
18
views
Composer dependency
Hello there I'm working on Wordpress plugin.
How do i prevent version conflicts with other plugins or themes.
Please is there any working code ?
Help me please
0
votes
0
answers
47
views
I want to move the one click accesbility button on bottom of my website screen,
I want to move the one-click accessibility button on bottom of my website screen,Kindly give me a code for that
0
votes
1
answer
64
views
Best approach to change mobile background image and adding its class
I have extended core/group block to add different background image when its being viewed on smaller view port.
I would like to know what will be best approach to add class name here which I did in my ...
1
vote
1
answer
321
views
How to make content as required in custom post type?
I created custom post type Testimonials and made the title required using the code in this link:
Require title for pages
Now I applied the code in order to make the content required, and it works fine....
0
votes
1
answer
145
views
How to Enfroce Domain Licensing Limits? [closed]
I'm looking to sell premium WordPress plugins (using Easy Digital Downloads licensing manager) and I want to limit the number of domains the plugin can be activated on (to receive automatic updates). ...
0
votes
0
answers
64
views
Meta box not displaying on the plugin page
I am working on a plugin and I am creating a meta box on my page using the below code but it's not displaying anything.
Any idea where is the issue with my code?
class bt_dashboard
{
function ...
0
votes
1
answer
231
views
Override plugin constant using a theme
I have a plugin which starts:
<?php
define( 'MAX_THINGS', 30 );
I would like to change the constant to be 2.
I know I can edit the plugin file directly - but that will be overwritten if the plugin ...
0
votes
1
answer
534
views
How to escape html code?
WordPress says, "You always want to escape when you echo, not before." Now how to escape below line in my plugin. Notice that I pass a variable inside html.
$wfam_woocommerce_active = '<...
0
votes
1
answer
225
views
Code for unique user visit count on every page Wordpress
I am working a project and I've decided to develop a custom plugin for it and I want it to show every users page visit count somewhere in the footer.(For example, if a user clicks on a page, it would ...
1
vote
1
answer
110
views
What is the purpose of a companion plugin
I have run into several themes, that clients have chosen, that have "companion plugins." These plugins have to be installed as a separate step after the theme is installed. What is the ...
0
votes
1
answer
22
views
Seperate plugin and theme files
I am in desperate need of help, regarding the following issue:
I need to establish an API Connection to Salesforce, so that a user can search and retrieve certain data out of Salesforce.
I thought, ...
0
votes
1
answer
28
views
How to get authors who have added the post in the specific custom post type
I have a custom post called event and I have to show all the authors who have added the post. I have tried the below code but I am getting all the users on the page.
For example. There are 4 users ...
0
votes
1
answer
138
views
require_once not working in plugin wordpress
I'm creating a plugin and I have to add some custom controls through the plugin. Here is the code for the custom control defined in featured-types.php -
function ...
0
votes
0
answers
242
views
Widgets are not displaying in the admin panel
I am using WordPress, I have an issue with the widget. I am not getting the widget in the WordPress admin panel.
I am getting the error in the console
Uncaught (in promise) TypeError: null has no ...
0
votes
2
answers
66
views
plugins not working in custom theme
I am creating a custom theme. In it I am trying to add salon booking plugin. This plugin creates default booking page. When I am viewing the booking page I cannot see the booking form. I have tried ...
0
votes
0
answers
3k
views
How to override any plugin file in the child theme
I have a plugin template that I need to overwrite but I need to be able to put the updated file in my theme to avoid changes getting overwritten by updates.
The file is located at '/wp-content/plugins/...
0
votes
1
answer
33
views
Release the plugin in the WordPress repository where redux is used
I am developing a plugin for the WordPress repository.
I'm going to use redux for the settings.
redux is a wordpress option managment plugin. https://wordpress.org/plugins/redux-framework/
But I do ...
1
vote
1
answer
591
views
WooCommerce get_price returning wrong price when used via ajax
I'm working on a site that uses the Events Tickets plugin, and I need to get the price of a ticket (Woo product) by ID. I'm using wc_get_product( $ticketID )->get_price(); to to do this.
Adding the ...
1
vote
1
answer
146
views
Display post lists in 2nd paragraph
Hello great WordPress developers, I would like to list posts from a specif category in the 2nd or middle paragraph of the post.
I tried adding some scripts to my function.php to achieve that, but I ...
0
votes
1
answer
101
views
submit two file input fields in the same form
I have a form which has two file input fields, each input should be submitted in different metabox in custom post type, when I try to submit the form it takes only the first one and ignore the second ...
0
votes
1
answer
53
views
Newbie problem with adding include wp_footer
It's a long, long time since I cobbled together my site and in that time I've forgotten what little I thought I might just know.
I have the FooGallery plugin on this page https://www....
0
votes
0
answers
1k
views
Content-Security-Policy implementation with WordPress W3Total Cache plugin installed
Documentation about this says to avoid inline script and css
Error:
Refused to execute inline script because it violates the following Content Security Policy directive:
What I have used so far:
...
-1
votes
1
answer
134
views
How to create post comparison in wordpress
I am creating a feature in the child theme which is vehicles(car) comparison. the checkbox will add the vehicles(car) in the compare list from the car listing page. and compare page will give the ...
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
1
answer
518
views
woocommerce: Customize email with item total count
i looking everywhere, but not found this functions, i need to calculate the total items in the report email new order,i think is (admin-new-order.php)
so i need to see the numbers total products in ...
1
vote
1
answer
51
views
Open Post Thumbnail in New Child Theme File in Wordpress
Today I am stuck in a new problem using WordPress Theme Development. What I'm going to do is to open a Thumbnail image in a new separate child theme, when the user clicks on the anchor tag.
Example:
...
1
vote
1
answer
200
views
How to use get_theme_mod in gutenberg editor wordpress?
In my old WordPress themes (before Gutenberg) I used get_theme_mod to get custom values for certain things in the theme.
get_theme_mod( 'news_custom_headline' );
Now I would like to use the gutenberg ...
0
votes
0
answers
15
views
How to Add call button on a featured image in a wpsite? check the slap king image, there are two buttons on the featured image
I want to add 2 buttons on the featured image of my WordPress pages. Kindly help me out.
0
votes
0
answers
23
views
Wordpress hierarchy clarification, does post_type_archive take precedence over taxonomy-term archive?
Looking at the hierarchy diagram indeed the post_type archive is above the taxonomy however aren't they parallel and isn't taxonomy-term-archive more specific?
the permalink: domain.com/cpt1/...
2
votes
1
answer
2k
views
How to retrieve custom meta term of category taxonomy from WP Rest API?
First I added custom meta term called Color for Category taxonomy, see the code below
Add new colorpicker field to "Add new Category" screen
function colorpicker_field_add_new_category( $...
0
votes
1
answer
801
views
How can I find related learndash course id from woocommerce product object?
I have woocommerce integrated with LearnDash. Now I am trying to get the selected course (related course) from the woocommerce product object or any other way (by woocommerce product id). There must ...
0
votes
1
answer
270
views
Child theme modifications not showing up
i am working on a job-portal site and i am little stuck into one situation . I uploaded a child theme and activated it. The child theme is activated successfully but it dosent show changes that i do ...
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, ...
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 ...
1
vote
1
answer
78
views
wp_get_post_terms is difference obj model than the one in rest api response
I'm building a mobile app and using the rest API on WordPress to do that, I am customizing the /wp/v2/posts response by using the following code:
add_filter('rest_prepare_post', '...
7
votes
2
answers
6k
views
Update Multiple Post Meta for the Same Post In One call?
How can I update multiple fields/Custom fields for the same post using only one call?
Everything I came across are cases of multiple calls of "update_post_meta", for each of the fields.
Is ...
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 ...
0
votes
0
answers
94
views
how to change a static testimonials into dynamic
i have a section in my home page where i have testimonials and i want to customize it !
im using TC Testimonials plugin and i want the dots to be separated and in front of the testimonial section
...
0
votes
1
answer
112
views
What form should the $query media query array have for an Elementor page builder function? [closed]
I'm building a theme with the Elementor page builder and I want to add some CSS output to certain elements. I hooked into the parse_css function.
I want to use the stylesheet::add_rules() function (...
0
votes
1
answer
140
views
Rename a folder via HTML POST request
I am trying to rename a folder in the uploads folder if an HTML form is submitted (used to edit entry names).
This following code is what I have so far but it isn't working.
if(isset($_POST['...
1
vote
1
answer
1k
views
Override the filter from plugin in child theme
I have a filter below from plugin file:
$review_num_fetch = apply_filters('tourmaster_review_num_fetch', 5);
I want change the number from 5 to 3, I’ve tried change it like below:
// reviews number
...
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
26
views
My wordpress local urls is still displayed even moved to live
My wordpress local urls is still displayed in some pages even moved to live. How do i fix this,
local urls displayed in "canonical link", " meta property="og:locale" code, "schema code".
NB: We are ...
0
votes
1
answer
1k
views
How to get a post views count using 'WordPress popular posts' plugin
I am using 'WordPress popular posts' plugin, and I'm trying to get post total views by ID using:
wpp_get_mostpopular() function.
Is there anyway to achieve that? or is it even possible?
2
votes
2
answers
472
views
Showing Co-Authors on post page
I am trying to make my theme compatible with Co-Authors Plus plugin and show the co-authors of a post if had any.
I spent about 30 minutes trying to convince myself that I understood the following ...
0
votes
1
answer
381
views
How can I see $post object in frontend from functions.php?
I would like to see the dump data of $post object in any page. So which code snippet to add in functions.php?
global $post;
print_r ($post);
This is not working. Please suggest.