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

learn more… | top users | synonyms (1)

0
votes
2answers
16 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
21 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
13 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>'; ...
-1
votes
0answers
28 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
2answers
22 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 ...
0
votes
0answers
10 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
1answer
38 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' ); } ...
-1
votes
0answers
15 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 ...
1
vote
1answer
33 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
1answer
42 views

Redirect to another page not working SOLVED!

I have a custom page template (1 file only, contains with CSS, HTML and PHP) with a form and it will send an email after the user click the submit button and it will redirect also to another page. ...
2
votes
3answers
344 views

Is using eval() ok in this scenario

I am trying to include user input includes using "get_template_part()" The includes are added in the theme options eg a user inputs. get_template_part('content/block', 'branding'); ...
0
votes
1answer
39 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 ...
0
votes
2answers
38 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 ...
2
votes
1answer
2k views

How to get Poster (thumbnail) Image of Video

I'm getting all videos using the function below and it's working fine. Now I want to get the videos Poster Image (Thumbnail Image) from that video. How can I get the video Image as thumbnail? I've ...
0
votes
1answer
27 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> ...
0
votes
1answer
11 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
23 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
31 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 ...
-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
votes
1answer
27 views

How to limit users from accessing other users [on hold]

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
10 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 ...
0
votes
0answers
29 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
0answers
10 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
9 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).
0
votes
0answers
28 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
27 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
35 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 ...
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
0answers
21 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
1answer
839 views

Uploading files using the Settings API

I've used the Settings API in the past to output text inputs and checkboxes but am unsure if I can use file inputs. My add_settings_field() is: add_settings_field( '1', 'File 1', array( $this, ...
0
votes
1answer
455 views

Accessing an API with jQuery and AJAX

As a proof of concept I'm trying to access an API using jQuery and AJAX and posting the results to a page. After following some online tutorials and doing my best to put it all together, I have the ...
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
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 ...
-1
votes
1answer
40 views

How to list all the posts in a personalized page? WordPress

Well, I created a custom page where I need it to return all the posts that have registered on the site, like the index. I tried to do in the normal way, by creating a custom page and assigning it the ...
0
votes
1answer
2k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
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
26 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
1answer
953 views

Link a lightbox thumbnail to a post instead of opening the lightbox

On my website portfolio I use a heavily modified version of the Swatch theme from Woo Themes. The theme makes the thumbnails for my portfolio pieces link to the lightbox. I want the thumbnails to ...
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
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
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
1answer
1k views

Apple push notification doesn't work

I wrote a plugin which fires an apple push notification to IOS devices. When I fire it manually via the root directory, it works perfectly. The catch, when I move it to plugin folder and run it as a ...
0
votes
0answers
9 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 ...
1
vote
1answer
888 views

Specified file failed upload test. wp_upload_handle

So I managed to write a peice of code that allows me to upload a zip file, im not even sure where it gets uploaded too, and I am doing it on my localhost with apache in control (www-data). the code is ...
-2
votes
0answers
22 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
2answers
20 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
1answer
18 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 { ...
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 = ...
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 ...
0
votes
0answers
20 views

Enable/disable code in functions.php with options

Is there a way to enable or disable lines of code in a themes functions.php file? Basically I would like to have a page in the admin panel that lists "modules" or separate php files and has the ...