Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The server-side programming language that the WordPress core, plugins and themes are written in.

0
votes
0answers
7 views

Not Echoing results of my query - need a little help

I have written some code to access my database and echo the results onto the webpage. Unfortuantely, I must have something wrong in my code. Thank you so much for any assistance. $conn = new mysqli("...
0
votes
1answer
21 views

How can i style “echo apply_filters”

With WordPress I have years of experience but with PHP I do not have much experience. I want the available product colors on the shop page and that's working! :) But i want a text before the ...
0
votes
0answers
13 views

Error http 500 “admin-ajax.php”

I'm having the error below displayed in the Chrome console every time I try to run a particular plugin. His name is YITH Watermark. The 500 error occurs exactly when I click the button to generate the ...
0
votes
0answers
12 views

Incorrect FTP authentication is blocking a plugin install and setting FS_METHOD to 'direct' in wp-config doesn't help

I'm trying to install the plugin "Form Maker by WD" into my WordPress site. Whether trying to install directly or through downloading and then uploading it, it throws an "incorrect ftp username/...
0
votes
2answers
18 views

ACF: Echo page title when checkbox is checked

How can I show the title when a checkbox is checked. I use Advanced custom fields my field name is nav This is what i currently have. <?php if(get_field('nav')) { ?> <li> <a href=...
0
votes
1answer
21 views

deactivating an active plugin using if page

Good day! just wondering if you can help me out? I was trying to create a code for functions.php if the user currently lands on a specific page, thus the plugin will turn deactivated, but if the user ...
0
votes
2answers
25 views

How to echo every parent page title?

I have like 5 parent pages and would like to echo all their title's on the front page.php. Maybe with get_the_id(); but don't know how.
0
votes
0answers
6 views

Thank you page redirect to same after successful submission and the form is overlapped with thank you display in complete width of the form present

Anyone please help <script> function limitText(limitField, limitCount, limitNum) { if (limitField.value.length > limitNum) { limitField.value = limitField....
0
votes
0answers
13 views

Gallery only displaying the thumbnail picture

When we click to view a full gallery it just shows the full-screen version of the thumbnail. This problem began after we updated our plugins, but I tried deactivating them one by one and the only one ...
0
votes
1answer
20 views

Hook into all password resets in Wordpress and get password before hashing?

I'm syncing my Wordpress authentication system with an secondary/external authentication system and my site has at least two ways of resetting the password, including: Password reset email User ...
0
votes
2answers
18 views

Show parent category and subcategory once in while loop

I have tried several things but unfortunately do not manage to do it in a good way. I use a while loop to pick up dealers (custom post type) from different countries and provinces. In this loop of ...
0
votes
0answers
11 views

Relevanssi - A Better Search errors out when using the search term “timeline” [on hold]

I am using the Relevanssi - A Better Search plugin for a client. I have discovered when I do a search for the term "timeline" I get this error. Warning: call_user_func_array() expects parameter 1 to ...
0
votes
1answer
16 views

How can I add tinymce editor in Wordpress with jQuery?

I need to add a tinymce editor with a jQuery function. I know that tinymce is a js based editor so there need to be a way to do something like this: <div class="container"> <div class"...
0
votes
0answers
7 views

Update shipping rate cost based on Postcode dropdown choice

So this one is a mind bogle.... I hope someone has the time for this one. Similar questions have been asked, but none have the solution to this, so please :-) Im using custom scripts to change ...
1
vote
1answer
9 views

Use wp_get_recent_posts with search term

I have a function that uses wp_get_recent_posts() I need to use this same function on my search page but am having problems adding the search parameter to the $args array. Does anyone know if this ...
1
vote
0answers
11 views

Video processing using ffmpeg in Wordpress (Video preview)

I want to preview the submitted video articles. As a clear example; youtube video thumbnails. But I'm not talking about a fixed image. When the mouse is over the thumbnail, it should show a few frames....
0
votes
1answer
18 views

How can I add a button the the WooCommerce MyAccount page?

I'm trying to add a button at the end of my WooCommerce MyAccount navigation: I need this after "Konto-Details". I'll name the button "Konto löschen". So far so good. This is what I've tried: ...
0
votes
0answers
23 views

how to remove only parent tag from wordpress post content?

I have following html stored in my post content and I want to perform some operation on that content using php dom parser.here is my html <div class="waterfall_new_layout"> <...
0
votes
0answers
14 views

Need to insert custom shortcode to replace theme search

I'm using ajax search pro and the replace search feature (which replaces current search with new ajax isnt working.) I'm trying to replace it but I'm not 100% where to put the short code. Theres a ...
-1
votes
3answers
34 views

how distinct that if click product page corporate then show created widget corporate menu [on hold]

<?php if ($product_type == 'Corporate') :?> <ul class="sidebar-container"> <li class="sidebar-item"> <...
0
votes
1answer
24 views

List events by month

I am working on a WordPress site consisting of a custom post type called "events". Each "event" consists of a custom field called "event date". I'd like to organize all the "events" by months based on ...
0
votes
0answers
12 views

Widget PHP code isn't working

So I have a custom post type, and a php code widget that is connect to said post type and updates every time there is a new post in that type, but it's supposed to redirect when the display on the ...
0
votes
1answer
10 views

How can I get all values from my array in a loop in php?

I've following array: Array ( [0] => Array ( [0] => 585 [1] => 596 ) ) Now I want to print all values (585 & 595 .....) row for row in a ...
0
votes
0answers
9 views

Hot to edit WooCOmmerce dashboard?

I'm trying to edit the WooCommerce MyAccount dashboard. When you take a look at my function you can see that I first tried to remove the whole content because I want to set my own one: add_action('...
0
votes
0answers
19 views

How can I get date range of Events even if not exists?

I am building a Tribe Event Calendar custom Carousel query (wP_Query) in Wordpress using a custom query. I have the events query working great, but I want to display even the empty dates that have no ...
0
votes
1answer
16 views

Generating rel=“prev” and rel=“next” using filters

In wp-includes\link-template.php the function which defines the pagination is: /** * Retrieves the previous posts page link. * * @since 2.7.0 * * @global int $paged * * @param string $label ...
2
votes
1answer
22 views

Updating WooCommerce variable product stock issue

Soo.. I've created CRON script, that each 1 minute retrieves an actual stock systems data, converts it for Wordpress/Woocommerce database table and updates stock. On database side everything looks ...
0
votes
0answers
24 views

How to load page content in an “AJAX callback container div” without using PHP file_contents or cURL?

When making AJAX calls with JQuery, the provided URL is executed and generated html returned to the callback function where it can be put in a container div for instance. However, in Wordpress, the ...
0
votes
0answers
26 views

Problem with Mobile navigation menu with wp_nav_menu() function in WordPress

Here is the problem. I'm creating a theme in WordPress and I have trouble with dinamic navigation menu on Mobile devices. Here is the code which I use: <nav id="primary-menu" class="navbar navbar-...
0
votes
0answers
11 views

How to create a gallery using WP CLI?

I am hoping someone has some insight into how to create a gallery using WP CLI. Or at the very least get the IDs for the images imported using "wp media import". I've tried using --porcelain but it ...
0
votes
0answers
6 views

Add floating chat head button below the page [closed]

Im planning to add floating chat head because kakao talk doesn't have a plugin. Is there an easy way to implement this? Thanks for any help
0
votes
0answers
14 views

Need help displaying custom labels before prices in Woocommerce

Good Afternoon StackExchange; I am needing a bit of help on figuring how the proper php code to achieve the label set up on various products throughout my woocommerce store. Basically what I am ...
-1
votes
2answers
22 views

Adding multiple emails to a

I inherited a WordPress site that has a lot of custom coding that appears to be Bootstrap. A contact form is coded in a PHP file and the client would like to add a couple more email addresses for ...
0
votes
0answers
25 views

Error on wp_default_style After upgrade to php 7

After upgrading my site to php 7. I have been constantly getting this error regarging the parameter to native wordpress function wp_default_style(). Spent so many days to fix it but was not able to ...
1
vote
1answer
24 views

How do I start using an external API and PHP for a WordPress.org page?

I have created some reports for some web pages that use JavaScript HTTP Requests to retrieve some data from an API. I would like to use the reports on some WordPress pages. I have done a lot of ...
2
votes
3answers
27 views

Show Specific Footer Widget for Specific Pages

I registered a new footer widget with this code. register_sidebar(array( 'name' => esc_html__( 'Footer Sidebarprestige', 'realtor' ), 'id' => 'footer-sidebarprestige', 'description' => ...
0
votes
1answer
17 views

Extend Woocommerce Widget Class - WC_Widget_Product_Categories

I'm trying to extend the woocommerce class used to create the product categories widget in my own plugin which adds a new taxonomy for woo commerce products called "departments". When I extend ...
2
votes
2answers
44 views

Problems with function on function.php

I've a problem with some functions on function.php. I want to use get_tems_by("slug", $slug, "category"); but it doesn't work inside a function on function.php. When i changed slug by ID and give a ...
0
votes
0answers
25 views

WooCommerce Wrong Tax Calculation

I got a problem with tax calculation when i create woocommerce products. For example i create a product with some variations, i set the regular price but when it goes to Cart page it automatically ...
0
votes
0answers
18 views

ZipArchive not working [closed]

I am generating a zip file with the following code: function create_zip($files = array(),$destination = '',$overwrite = false) { $valid_files = array(); if(is_array($files)) { foreach(...
0
votes
0answers
11 views

How do I display a random “custom post” that will last for a specified amount of time without repeating content?

I saw someone else's question, but it was posted over seven years ago, and I am not very savvy about changes that may have occurred that would render the solution useless. I have several different ...
0
votes
1answer
10 views

get_category_parents to array

Ok, So I get a choice from a wp-dropdown. This choice is a category. I use this category to find it's parents. This seem to be outputting a string. This string should be converted into an array. And ...
0
votes
1answer
12 views

Adding body class to html tag that already has language attrubutes?

In my theme (Underscores based). I have <html <?php language_attributes(); ?>> Then I'm calling the body class function on the body tag: <body <?php body_class(); ?>> ...
2
votes
1answer
24 views

When is is_admin() available?

I see a lot of plugins that consist of a class that is instantiated in the same file, eg: class My_Plugin { function __construct() { add_action('init', array( __CLASS__, 'baz' ) ); } ...
0
votes
0answers
12 views

Woocomerce Save Price

I have a problem to save sale price , here my code // Display Fields add_action('woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields'); // Save Fields add_action('...
0
votes
1answer
18 views

How to unserialize data from MySQL

I'm trying to unserialize data from WP's MySQL table. It looks like this my function from template-page.php <?php function get_values(){ global $wpdb; $parsed = $wpdb->...
-1
votes
0answers
11 views

Modify link address in membership account page [PMPro] [closed]

I wanted to change the default link address of “change password” & “edit profile” to other page/link address and I actually manage to do it by modifying the shortcodes -> pmpro_account.php ...
0
votes
1answer
39 views

wp_redirect() not working in Insert PHP plugin in WordPress

This is my code in insert PHP plugin. I have added this PHP snippet generated by the plugin in a page in WordPress. The wp_redirect is not working with this snippet. // define variables and set to ...
0
votes
0answers
11 views

load more portofolio page wanted

i want to put a load more in this code portfolio page, how can i do that? the pictures is big and the site is slow <section class="section white-section portfolio-padding-top-bottom-1"> <...
1
vote
0answers
15 views

Limit Widgets to Sidebar ID's

First, my English is not good, sorry about that. I have widgets. I want to limit them by sidebars ID's. I did that but it's working only moving widget left to sidebar areas. But when I reload page, (...