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

learn more… | top users | synonyms (1)

0
votes
1answer
18 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
1answer
10 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
22 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
22 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
20 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
15 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 ...
0
votes
2answers
33 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 ...
0
votes
0answers
11 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 function volcano_contact_section() { echo 'Activate and Deactivate Built-in Contact Form'; } ...
0
votes
0answers
7 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
1answer
25 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
26 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
9 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
7 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
27 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
26 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
0answers
20 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
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
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
21 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
35 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
16 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
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
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 ...
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 ...
-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
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
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 { ...
1
vote
1answer
21 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 = ...
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
0answers
24 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 ...
0
votes
0answers
19 views

Access a WordPress Table from Outside Project

I have a PHP project on example.com and I have a WordPress installation on example.com/blog. I need to get data for my PHP project from one of My WordPress table. Is it possible? If it is possible ...
0
votes
2answers
26 views

Call global variable array() in woocommerce child/template

So I have this in my functions file - it defines the products that are not eligible for free shipping. It works everything is fine. //functions.php function my_free_shipping( $is_available ) { ...
-2
votes
1answer
29 views

Javascript code not working - $ is not a function error

On redesign out web site we wanted to add the slick js carousel function on the homepage. Followed the instructions to the slick javasriprt website http://kenwheeler.github.io/slick/ but it does not ...
0
votes
0answers
13 views

How to recreate post form on a custom PHP page.

I need to have my users be able to post pages on a custom php page, not through the standard Wordpress menu. Therefor i'm trying to recreate a form that can post just like the Wordpress 'add post' ...
-2
votes
0answers
16 views

How to get Fpdf,html2pdf or Dompdf get work in Wordpress custom template?

Im working on a project to let html input change into a pdf file. I know that are these working pdf programms, but how do i put it in Wordpress and let it work in there?
-3
votes
1answer
32 views

Please help! Parse error: syntax error, unexpected '<' in blog code, no idea how to fix it! [closed]

This is currently the code: <?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Enqueue scripts and styles add_action( 'wp_enqueue_scripts', ...
0
votes
0answers
26 views

Position banner to right of logo in header - messed up my header file

Hi I made a mistake by editing my header.php file before backing it up and now having trouble getting it right. There's just a <div> tag missing or something but I am spinning my wheels so maybe ...
-2
votes
1answer
34 views

Messed up my header.php file trying to position banner

Hi I made a mistake by editing my header.php file before backing it up and now having trouble getting it right. There's just a or span tag missing or something but I am spinning my wheels so maybe ...
1
vote
0answers
11 views

Adding a widget function into the php theme file

I am using the following plugin - widget No Cache AJAX Widgets to display on the sidebar a feed of rss news that is created dynamically and bypassing the cache function. In updating the site we wish ...
3
votes
1answer
28 views

Wrap each shortcode in array to div

i'm trying to wrap each shortcode in div with special data attributes, but when i'm using nested shortcode they don't wrapped, where i'm wrong? thanks public function wrapShortcode( $content ) { ...
0
votes
0answers
30 views

Displaying recent posts on static page with template-part via shortcode

So, I'm taking my first shot at creating my own custom Wordpress theme with Underscores. I have everything straightened out, with the exception of one last thing I want to add. I would like to add a ...
0
votes
2answers
49 views

Wierd site output [on hold]

I'm quite new to Wordpress, I've build a website and found out in the Google WebMaster tool that one of the most present keyword was [%%LINKS%%]... I've found this code: <div ...
0
votes
1answer
45 views

Parse error: syntax error, unexpected end of file in functions.php on line 487 [closed]

After seeking a solution about thumbnail size, I found in wordpress codex some codes and when i add them in editor in function php my blog stopped working. It is a blank page with this error message : ...
0
votes
0answers
25 views

Notice: Trying to get property of non-object

I got the notice on this line : $team_options[$category->name] = $category->slug; $team_categories = get_terms('team_types'); $team_options = array("All" => ""); foreach ($team_categories as ...
0
votes
1answer
10 views

Wp Debug Enabled True Notices and Warning

Notice: Undefined index: Zumpito_event_full_day in /home2/michael/public_html/domainname.com/wp-content/themes/themename/included/main.php on line 246 Warning: Cannot modify header information - ...
0
votes
0answers
22 views

Cannot get custom links to show using wp_get_nav_menu_items

$args = array( 'post_type' => 'nav_menu_item', 'post_parent' => $id, 'orderdby'=> 'menu_order', 'output' => ARRAY_A ); $childs = wp_get_nav_menu_items( 4, $args ); ...