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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
0answers
2 views

Advertisement in Posts wordpress

I'm new here I want some help from you in terms of coding in wordpress. The point is that I want to make advertising between items as shown below: <?php $args = array( 'posts_per_page' => 5, '...
0
votes
0answers
6 views

How to build placeholder shortcode in Ultimate Member plugin?

I'm trying to build my own UM placeholder but I'm stuck on what to do next. Essentially, I need to add this placeholder to my outgoing emails, to contruct a URL that links to a file on the server. ...
1
vote
0answers
7 views

Update results, Before deleting the related category

There is a DB that contains 2 tables posts and categories, Each category could contain many posts, So I'm using one-to-many relation between the two tables. Using the id of the categories and a ...
0
votes
0answers
8 views

woocommerce multiple custom fields code

I used a guide to add multiple custom fields to the general tab in product post setting. When I enter data into the fields, it saves and shows on product page without problem; The problem is that ...
0
votes
1answer
13 views

Wordpress custom login form using Ajax

Description: I would like to create a custom login form: username, password and remember field. This is the code I have: Problem: /wp-admin/admin-ajax.php 503 () What I've tried: PHP: function ...
-1
votes
1answer
24 views

Add CSS class to PHP Statement

A newbie question, I have been trying to style certain PHP code and I keep hitting the wall. I need to add CSS class to the No results found text bellow: <?php } else{ ...
1
vote
1answer
27 views

How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts

How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts: i have this code here: add_action( 'wp_head', 'set_featured_background',...
-1
votes
0answers
11 views

How to display admin side images on client side in WordPress programmatically?

I am creating a WordPress plugin and I ask user to insert some images on the settings page of the plugin on admin side. Now when a shortcode is inserted in the post, I want to display those images on ...
-1
votes
0answers
11 views

Looking for code to add image banner in the header of a WordPress site

I am looking for a code to add a image banner along with site logo. This should be similar to MH magazine . I am currently using Grow free version template.Any help or suggestions will be helpful
1
vote
3answers
48 views

Wordpress Template Engine?

I'm in a need to convert an existent design into wordpress and before starting I was curious to know: Is it correct to use pure "naked" PHP when adding logic to templates in wordpress? Wordpress uses ...
0
votes
0answers
17 views

fputcsv function - nothing happens

I am working on a new plugin and one of the features it suppose to have is to put some data in a .csv file. When using the fputcsv function, nothing happens. I am not getting any errors but the data ...
0
votes
0answers
10 views

Private Client Page

I'm not a developer, nor know the basics of proagramming and have been looking for a plugin that can give me a page for each individual client that I can put reports on and other things like Google ...
-1
votes
0answers
7 views

which is the best plugin for student fees collection monthly and quaterly?

I am building a school website where they need total fees collection, admission, result, report card generation system. I am stuck in fees collecction. i want a good plugin with credit and debit card ...
1
vote
0answers
11 views

WordPress Gravatar filter is removing my custom attributes

I am trying to add a style attribute on all the custom gravatar images. However, it is removing the style attribute before final output. Here is the code I am using: $background = ''; $args = [$...
-2
votes
1answer
14 views

Saving User Input to PHP Variable

When a user enters my site, the first page will ask them for their name. I want to make a tailored experience for each user. How would I save this text input to a PHP variable so that I can then ...
0
votes
1answer
17 views

Set user status to absent on Wordpress

Analyzing the function give to get an idea how to solve the question, I do not know if it would work but what if the function give two checks. Let's say the function first checks in the first 3 ...
-1
votes
0answers
18 views

I checked online and got different answers for the php error. Any help will be appreciated in telling me the fix

array( "name" => "Featured Posts Category", "desc" => "Last 5 posts form the selected category will be listed as featured at homepage. <br />The selected category should contain ...
0
votes
0answers
8 views

How hide post from loop with a certain field?

I have this code: <?php /** * WP Job Manager Related Jobs * */ function wpjm_related_jobs_display($options=array()) { if(!count($options)) $options=get_option('wpjm_related_jobs'); ...
-1
votes
0answers
14 views

SQL query combine, without multiple loop get data using one query [on hold]

How can I get the same data using one query $result = "SELECT classid FROM student_result_history WHERE s_id = 11 GROUP BY class_name"; foreach($result as $row){ $classid = $row["classid"]; $...
0
votes
0answers
10 views

How we can Send New Posts through wordpress to Whatsapp Groups/Broadcast Automatically? [on hold]

I want to Setup a feature whenever we will publish a New Posts at my wordpress Blog then it will be automatically send to my Whatsapp Groups/broadcast. Even some information regarding this are ...
-1
votes
0answers
15 views

How to run php script on separate wordpress installs?

I made a simple command line php script to create posts. I would like the script to create posts on separate wordpress installs on the same server. Right now i just copied the script to both wordpress ...
0
votes
0answers
20 views

WordPress Cron - Long running process on shared hosting environment

I have a question which I wasn't able to resolve. I'm developing a plugin, and I have a long running cron task, in a nutshell I'm scraping some data from external urls and after that I am adding that ...
0
votes
1answer
21 views

How to display last whole post on the homepage

I try to show on my homepage only the last post, in complete version. I tried numerous methods unsuccessfully. I tried in particular to create a specific template: “front-page.php”, in which I put ...
0
votes
1answer
17 views

PHP -> SQL Query with Summing

So I'm trying to display the sum of Paid Transactions for a customer's account: SELECT SUM(`payment_amount`) FROM `wp_gf_entry` WHERE `created_by` = '2' AND `form_id` = '37' AND `payment_status` =...
0
votes
0answers
16 views

How do I hide all tabs until clicked? [closed]

Hi - I am using fruitful tabs on wordpress, but I can't figure out how to hide the tabs until they are clicked on. In the example here the "About" tab is always open when the page loads, i'd like it ...
-2
votes
0answers
21 views

For WordPress Hosting, which has fewer WordPress issues: EasyApache4's PHP 7.2 with: OpCache or ZendGuard? [closed]

With nearing PCI Compliance deadlines, many WordPress users who self-host on older environments will be moving from end of life PHP 5.4 to PHP 7.1 and 7.2 environments. If the environment utilizes ...
0
votes
0answers
25 views

Replace tag on wordpress

In my wordpress theme, the portfolio gallery is tagging some items without the 'start' tag (so that they load as you scroll down the page). The problem I'm facing is that when the gallery is filtered, ...
0
votes
1answer
15 views

How to hide posts of a specific custom category in Wordpress?

I have 2 custom post types on Wordpress website - Location and Event. Location is connected with Event as meta data (for sorting). For example: some event (Event post type) is taking place in London (...
0
votes
1answer
34 views

Python in Wordpress - A “Hello World” implementation

I've read this question (and many more web pages) in order to figure out how to run a simple python script via a Wordpress plugin. However, I couldn't do it: I always get a "Blank" output. No errors ...
0
votes
0answers
18 views

URL Parameters Saved In Search

Can someone help me to figure out how, after a user has saved a search on my site and wishes to get notified if anything new matching that search criteria has been added, can I then re-run the saved ...
1
vote
1answer
37 views

Converting MYSQL to WordPress $WPDB

I’m upgrading an archaic Wordpress site from 3.7. It has some SQL query requests that don’t function after 3.9+ where you now have to connect to the DB via $WPDB (https://codex.wordpress.org/...
1
vote
2answers
52 views

How to make WordPress plugin check for database changes and then do something?

How do I for instance check if there is written a new comment in the database and then make my plugin register that there have been a change? I will use this information to do something in the ...
0
votes
2answers
29 views

get_post_types() can't get some of my post type

I want to get all post types filtered by get_post_types() arguments. public static function get_post_type() { if(!$post_type = wp_cache_get('post_type', 'dsad')) { $post_type = ...
-1
votes
1answer
20 views

Send foreach $_post method to contact form 7 [closed]

I have a list of products generated by Javascript, I need to send them by the POST method via “contact form 7” If the list had 10 items, it would not be too heavy write 10 lines of code with "Contact ...
1
vote
1answer
28 views

How do I edit the php/html for a particular post?

I am new to Wordpress but I am comfortable coding in html/php and want to create custom forms on some of my posts. My site is currently running on localhost. I feel very silly because I have been ...
0
votes
0answers
8 views

Style Dynamically Generated Divs [closed]

I am attempting to style divs that are echo'd to the front page. So for example, I want the user to be able to add a post to the front page via the admin area, but I don't understand how I would ...
0
votes
0answers
12 views

Get Avatar Url Weird Result and Parse Avatar URL From get_avatar() Not Working

simple task here. I need to get the url of my user's avatar so I can use it as a background-image. I tried get_avatar_url() but it oddly always gave me the wrong url, going to a gravatar domain. I ...
-1
votes
0answers
21 views

PHP How to able or disable a plugin or plugin functionality (WooCommerce deposits) based on user role? [closed]

I am building a private distributor WooCommerce store with woo private store plugin from Barn2 media. This store is part of a website with a public area where customers can apply for a distributor ...
-1
votes
2answers
15 views

Advanced Custom Fields with before / after attribute

I am trying to display an alternative title on my home and archive pages created with Advanced Custom Fields. The original code is the following: <?php the_title( sprintf( '<h2 class="entry-...
-2
votes
0answers
21 views

404 on pages after PHP and Apache update [closed]

I have 2 Wordpress sites that I’ve upgraded to PHP7. One was from 5.4 to 7 and the other was 5.6 to 7. After migrating the WP files and the DB, I get a 404 on on pages and posts. If I change ...
0
votes
3answers
37 views

Weird problem happening with custom taxonmy when creating/updating posts

I have created a custom post type as well as a custom taxonomy, however when I added my first item and selected a category/recipient something weird happened, it automatically created an additional ...
0
votes
0answers
19 views

Creating a non-hierarchical Taxonomy that behaves like categories

I've created a custom post-type along with a custom taxonomy and everything is fine, apart from one particular thing. First off, my use case: I need it to act like a category system, however not be ...
0
votes
1answer
30 views

PHP abling or disabling stock management function in woocommerce depending on user role

I am building a store in woocommerce where pricing is already user role based. How can I have the stock management function abled or disabled also depending on user role?
0
votes
1answer
16 views

Customizer: How to Sanitize a Decimal Number Range

I have the following Customizer control/settings to control an image's opacity: // Image Opacity $wp_customize->add_setting( 'image_opacity', array( 'default' => '1.000', '...
1
vote
1answer
26 views

How to make my custom widget appear within WordPress widgets? Plugin development

This is my first WordPress plugin ever, so i'm a little noob. But why is my widget not showing within all the other widgets in my WP-Admin interface? It should be visible when i activate the plugin. ...
0
votes
0answers
12 views

Loading failed for the <script> with source “https://website.com/wp-includes/js/admin-bar.min.js?ver=4.9.8”

I am having an error here and there, I am trying to pin point exactly when it happens but so for I didn't succeed... I am getting this error: Loading failed for the with source “https://website....
-1
votes
0answers
6 views

Woocommerce Filter Product using color and Category?

I am trying to integrate the woocommerce rest APIs with my Applications. All the defaults operations like get all products, get products by category etc are working perfectly fine. but how i apply ...
0
votes
1answer
22 views

Exclude category from sitemap Yoast Seo [closed]

Yoast recommends this to exclude a category from their sitemap_index.xml but it is not working. /* Exclude One Taxonomy From Yoast SEO Sitemap */ function sitemap_exclude_taxonomy( $value, $taxonomy )...
0
votes
2answers
28 views

Strip characters, Including spaces, for tel: link

I'm trying to create a proper 'tel:' link for phone numbers that are added in an ACF text field. So I'm just trying to strip extraneous characters, but the spaces are causing a problem. Existing code:...
1
vote
0answers
32 views

OOP and WordPress Plugin Development - Instantiating Objects [closed]

I am confusing with OOP and WordPress. It would be nice to get some advice. I have this files: some-plugin.php (WordPress plugin main file.) includes/class-autoloader.php (A custom autoloader that ...