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

learn more… | top users | synonyms (1)

-3
votes
0answers
6 views

How to make a API plugin show results in a post

I have an API scrapper plugin and I would like to add a button that makes the results show in the post page. Here is the code that's appears in the plugin page and displays results: <?php ...
0
votes
1answer
14 views

Code Executing Too Late?

I created an mu-plugins folder with this block of code in it: if ( $_SERVER["HTTP_HOST"] === "domain1.com" ) { $sitetype = one; } if ( $_SERVER["HTTP_HOST"] === "domain2.com" ) { $sitetype = two; } ...
0
votes
1answer
10 views

Display Year and Month from custom field + Age Calculator

I have a custom field "DOB" on my custom post type which is in [Ymd] format. I want to compare that date of birth to current time and want to show "You are # years # months." I am able to calculate ...
1
vote
1answer
97 views

What SQL / WordPress queries would need a nonce?

I'm a PHP / JavaScript developer and I'm new to WordPress. Our company's website is build upon WordPress. However I created many custom PHP pages without minding the WordPress framework much. When ...
-1
votes
0answers
17 views

Do not show expiration date information on Wordpress posts

I am using the code below to report the time it takes for a post expires in my Wordpress site, the value of expiration I define in a Custom Field (expiration). From this code, as I do I keep a post ...
0
votes
1answer
23 views

Apache HTTP Server stops working for only a certain local website

I work with a few local websites, but some time ago one of them started causing these errors when I try to use it. I couldn't find time for it and left it, so I can't tell what change started causing ...
-3
votes
0answers
18 views

Why Yoast seo Focus Keyword not working..? [on hold]

I Face some problem On Yoast seo Plugin 3.0.7 • The Focus keyword not update. I Mean when i publish a post all are good but the Focus keyword are Flush There only a empty Field Because of that My ...
0
votes
1answer
30 views

Override index with a custom PHP page

I have to achieve a very specific task in the project I'm working but I have no clue on how to start: Develop a new front page to override the current index page; The page cannot be created as a ...
1
vote
1answer
31 views

Custom Plugin For Converting CSV To MySQL

I wrote a plugin to add a csv file to the database. I created a custom table to use. My file path looks like this, wuno-uploader/wuno-uploader.php wuno-uploader/inventory.csv On an settings option ...
0
votes
1answer
21 views

enqueue multiple Google fonts with multiple weights and styles (italic).

I am trying to enqueue multiple Google fonts with multiple weights (400,600,700, etc,) and styles (normal, italic) and can't figure out why it is not working. This is the code that I am using in the ...
0
votes
0answers
17 views

Wordpress changes not showing

I'm wondering how to fix the website when the changes are not showing instantly? I tried the following fix: Installed W3 Total Cache and Super cache and cleared all the cache on the website Cleared ...
0
votes
2answers
27 views

WP Redirect with user nickname/username

I am trying to redirect the user after login/signup to profile page, but I am not sure why is it not putting the user nickname in url. $current_user = wp_get_current_user(); function aloginuser( ...
0
votes
1answer
26 views

Allow authors to post only in categories they create in WordPress

I'm looking for a way to allow users with an assigned WordPress role (in my case, author) to create new categories and then automatically be restricted to only posting in those categories or the ...
0
votes
0answers
24 views

wp_verify_nonce() didn't work in the function

I'm creating link with wp_nonce in GET parameter: $link = esc_url( wp_nonce_url( add_query_arg( 'my_arg', 1 ) , 'product_subscription' ) ); echo '<a href="'. $link .'">'. $link .'</a>'; ...
0
votes
0answers
17 views

log in form using a separate database

in the html code i have made this form: <form action="http://www.mySite.co/login.php" method="post"> <fieldset> <p><input type="text" name="uname" placeholder="Name" ...
0
votes
2answers
27 views

how can I include some custom variable from functions.php?

For example, if I add this code to functions.php: $mysite_address_url="http://my-site.com"; And then add this to one of my .php template files(like index.php or header.php): <?php ...
-1
votes
0answers
19 views

WSIWYG (tinymice) for woocommrece product tabs

Check the image. what i need is to add WSIWYG for one of woocommerce product tab in that way i can bold & separate lines etc. at the moment this option i need to add a text editor have a ...
0
votes
1answer
47 views

Revoke Access to certain user roles and admin pages

I'm building a website with WordPress, but it will be managed by more than 20 persons. What I want is to revoke access to each one without using a plugin. I added in functions.php some code for those ...
1
vote
1answer
13 views

Function causing the loop display posting more (empty)

By using the function: add_action( 'pre_get_posts', 'add_custom_post_types_to_loop' ); function add_custom_post_types_to_loop( $query ) { if ( is_home() && $query->is_main_query() ) { ...
0
votes
0answers
24 views

Warning Error When Visiting My Site

When some people visit my eCommerce site, they get this error: This is what it keeps saying: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_widgets_init' not ...
0
votes
1answer
40 views

Add a downloaded JS file to WordPress

I have a very large table (horizontally speaking) on my webpage and I added a scrollbar using the "overflow-y: auto;" property on my CSS, which does what I want. The problem is that this table is ...
0
votes
1answer
40 views

Double jQuery loaded

Please help me to understand why this works. I have loaded my jQuery in mu functions.php-file like this: <?php function load_jquery() { wp_enqueue_script( 'jquery' ); } ...
-3
votes
0answers
17 views

Data is inserting but not getting at back in php and html [on hold]

<form name="delivery address" action="db_connector.php" <td colspan="2"> <div align="center"> <?php $remarks=$_GET['remarks']; if ($remarks==null ...
1
vote
2answers
42 views

Create WP_Query to search for posts by their categories or their parent/child categories

Hello I am really sorry if this has been asked before but I couldn't find the exact solution I need. So here's the problem I want to create a search in my Wordpress page. Whenever a user submits the ...
-1
votes
0answers
29 views

Custom Theme Admin contact-form config page won't display

I'm stuck. I'm trying to add a contact form section in my theme admin. I have added: the functions <?php /* @package volcanotheme ======================== ADMIN PAGE ...
0
votes
0answers
13 views

How to use wordpress (php) functions in angularjs partials files?

I am using angularjs to load a list of my wordpress posts, however I can not get any of my php functions to work with my partials file. I've tried using something such as search.php instead of ...
1
vote
1answer
30 views

Different loop output every x posts in custom post type

I was following along in another StackExchange Question from a couple of years ago where there was a layout along the lines of: <div class=items active> <div class=row> ...
-1
votes
1answer
28 views

How to limit users from accessing other users [closed]

I'm trying to limit certain users from seeing certain other users within the database. We have a company that allows banks to register within their site with a membership. That company can then add ...
0
votes
0answers
13 views

How do I hide specific user profile fields?

I am using a membership plugin which pulls default WordPress user profiles to a directory. I want to hide these fields from my registered site users. I have searched for plugins and found nothing that ...
0
votes
0answers
10 views

woocommerce display total of completed orders on a product

I want to display the total of only completed orders of a product, now total_sales are displayed, but it contains the total of all orders of a product (processing or completed orders).
1
vote
0answers
31 views

Passing jQuery value using Ajax to a page template

I have the following jQuery code:- jQuery('.fancymember').on('click', function() { var member = jQuery(this).parent('div').parent('div').find('.test').val(); var dataString = 'member='+ ...
0
votes
1answer
35 views

Adding Additional Variables on Menus Page

I'm learning PHP by building a plugin to show or hide menu items based on a user's location. I am a bit stuck at the moment. In the function below, the text input is being saved to the database, but ...
0
votes
1answer
36 views

Different Crop / Scale Settings

I have an Affiliate Store with 8000+ Products from over 20 Partnershops. I refresh the Products via CSV ( WPALLIMPORT ) I use Woocommerce Each Shop has a different Image-size. some of them have to ...
1
vote
0answers
22 views

Dot is not added at the end of href

My Key is $P$BeVBjO.GF/Ngju8PCjKJgjV68buIgo. so you can see a dot at the end of my key Input: esc_url( add_query_arg( array( 'loginName' => $requestedUserLogin, 'key' => **$key** ), ...
0
votes
0answers
31 views

Can not call function in same class

i create plugin login but i can not call function in same class. i use plugin base boilerplate. what wrong my code ? This error Fatal error: Uncaught Error: Call to undefined function ...
0
votes
1answer
8 views

Find owner of coupon

I'm attempting to run a function for a user if they have a certain coupon. I'm using the plugin Smart Coupons to generate coupons with prefixes and suffixes. I can get a list of all the coupons in ...
0
votes
1answer
22 views

Passing different content to template parts

I have created a split screen template which I want to use accross various pages. I want the content to be different on both sides in all of these templates. How do I pass in different content to each ...
0
votes
1answer
36 views

Must use Plugin not updating HTML code in head

I am trying to insert code in head tag through MU Plugin. I don't know why head tag and init is not updating by using add_action('wp_head', 'my_function') and add_action('init', 'my_function2'). My ...
0
votes
2answers
17 views

PHP: Showing currency sign if input is a number

I have a field that lets me enter a price for a product in 'edit post'. Here's how it's currently called: <span class="price"> "$" <?php echo get_post_meta(get_the_ID(),'si-price',true); ...
0
votes
1answer
18 views

Displaying text if post was within 5 hours

Currently I have the following string. $timeago = human_time_diff( get_the_time('U'), current_time('timestamp') ); print $timeago; This returns results that looks like this. 1 min, 1 hour, 1 week, ...
0
votes
1answer
27 views

Run JS Code on userlog out

I'm trying to delete a variable stored in local storage when user logs out of WordPress, none of the two code blocks below work for me, both have been tested in my functions.php file one at a time. ...
0
votes
0answers
18 views

Javascript attr href not appending parameters on WordPress site

I have this exact code set up and running on a regular HTML/PHP site but when I tried setting it up in WordPress, it doesn't work. The code itself works, the Javascript is present when I view the ...
1
vote
0answers
11 views

comments sorting incorrectly across multiple pages

This is a related_comments.php file which should display comments on certain pages in ascending order while the newest comment should be at the top. This is working fine if there is only one page for ...
-2
votes
0answers
24 views

Broken e-mail link in header

I had a working e-mail link in my header but since I've activated my w3 cache-plugin it stopped working. I'm guessing I could fix it in an .php file somewhere, but I don't know where. The site is ...
0
votes
0answers
37 views

Custom WP Admin pages do not display after trying to add child to functions-admin.php

I am building a theme options page. I have a parent page with 3 sub-pages under that. Volcano (Parent) Sidebar Theme Options Custom CSS The Problem: All of these settings are not displaying at ...
0
votes
1answer
20 views

New walker for walker_nav_menu to change inside container data

I'm not really good with coding, but I have googled a lot and edit some script and it worked, but I can't achieve what I need. This is the code: class description_walker extends Walker_Nav_Menu { ...
1
vote
1answer
34 views

Check if page parent has certain template

I want to check if a page has a parent with a certain page template attached to it. If I know that I can determine which scripts to load or not. Normally I would just get the page template and if it ...
0
votes
0answers
7 views

Related Posts from String

Currently I am using a code I randomly found on the internet but I am trying to piece together how I can make it pull the $artist string I have set instead of pulling the tags. $tags = ...
1
vote
2answers
21 views

Wordpress Multiple Navigation bars

This is more of a 'Is it possible question" I have a home page which has a full width header and a transparent Navbar, when you scroll this Navbar changes to white. On all my other pages I want this ...
0
votes
0answers
25 views

Email not sending on wordpress

I am trying to send custom email using ajax in wordpress but it's coming back with 500 internal server error on form submission. Can anyone help me out with this concern <script ...