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

learn more… | top users | synonyms (1)

0
votes
1answer
58 views

Passing PHP Variables to JS using Localize Script

Im trying to pass some variables (author of the post, category of the post, and title of the post) to a js file using wp_localize_script. I cannot, for the life of me get these correct. How can I ...
0
votes
2answers
18 views

admin menu naming

how can I change the 1st child name of the admin menu in wp? I have upload a picture, I want to have a different name of the 1st child of the menu and the parent will be the same. this is mycode ...
1
vote
1answer
21 views

Replace text in post from cvs

I have constructed a post template that i want to use to all post. I use visual composer and some add ons . I need to create post with vcs file but i don't know hot to organize the cvs inside to do ...
0
votes
1answer
19 views

problem in inserting row to database

I have a custom table in database (named "wp_tasks") it has 5 fields. the problem is when i wanna insert the current time to this table it wouldn't, i checked for the first 4 fields, it works ...
0
votes
0answers
129 views

ajax form with multiple submit buttons and values

I am working in wordpress and I have an html form with two submit buttons with same classname and different value. I am passing the submit button clicked value through ajax and show it on the screen. ...
0
votes
1answer
66 views

Angular not defined [closed]

I have this code on my website and I don't know why the angular is not being defined and neither is the jquery. I'm fairly new to web development so I don't know what to do with the coding in order ...
0
votes
0answers
51 views

set external image as featured image

currently with the code below i am able to set an image from media library as featured image via functions.php below is my code functions.php set_post_thumbnail($post_id,$imageid); where ...
-2
votes
1answer
37 views

How can I search for usr_id within my date range with WP List Table?

I've fiddled around with the custom list table plugin for some time now but I'm not so much into MySQLi yet, so I hope there is someone here able to help me with my problem. My current code looks ...
0
votes
0answers
14 views

Custom Taxonomy as Link

I have this image here http://i.imgur.com/5szTQNy.png which shows the download button I will be talking about. I am trying to make it so that when I put in a custom taxonomy box in the back end the ...
0
votes
0answers
13 views

Loop childpage content

I need help with how to loop out all children posts with a specific template, so basicly I need a loop the gather all pages that is a child and has a template named "puff". Is this doable??
0
votes
1answer
19 views

Cannot load media and I get “PHP Warning: Invalid argument supplied for foreach(”

if I don't have active debug mode, I can't see any media in back end (in Media menu or even as in created gallery in a post editor). When I turn on debug mode: define('WP_DEBUG', true); // Enable ...
0
votes
0answers
12 views

Wordpress select adding an extra post

I have this script that is supposed to pull all of the posts with the same category id as the page titles name. So if the page titles name is "non-profit" it pulls all the posts with the category ...
0
votes
2answers
22 views

How do you detect if a specific word is at the end of a the_title()

I have event listings that look like this PAPA ROACH AT THE PARAMOUNT IN HUNTINGTON ON APR 28, 2015 Im trying to remove everything after the last "ON" $s = the_title(); echo substr($s, 0, ...
0
votes
0answers
23 views

count click on link class on posts and add it to custom field

I have 4 links on each of my posts (facebook, twitter, etc ...), what I'm trying to do, is that everytime someone click on one of this link, i'll have a counter incremented, and store the reslut in a ...
0
votes
1answer
62 views

Add jQuery to WordPress page

I need to add jQuery library to WordPress page. The page is rendered by a plugin shortcode. I've used the below methods but I don't see it working for my jQuery script. I tried to add these below ...
-3
votes
1answer
17 views

Event plugin problem any one solve .? [duplicate]

bool(false) object(stdClass)#5590 (3) { ["price_struct_id"]=> string(2) "11" ["product_id"]=> string(4) "1294" ["display_order"]=> string(1) "0" }
0
votes
0answers
45 views

Missing data in admin ajax calls on fresh install 4.2.1

I have a fresh install of wordpress (no plugins installed), and i noticed that $_REQUEST in admin-ajax.php doesn't have data fields. For example, $_REQUEST for adding new menu looks like this: Dump ...
2
votes
0answers
41 views

Making a follow button, Ajax not talking to php

I'm trying to make a user follow button using AJAX, but for some reason my AJAX isn't talking to my jk_user_follow function and setting the wp_set_object_terms. PHP function ...
0
votes
2answers
63 views

Search result page - display values from the result's metaboxes

i have this custom search-result page global $query_string; $query_args = explode("&", $query_string); $search_query = array( 'nopaging' => true, 'post_type' => ...
0
votes
0answers
7 views

Organization of different portfolio under a user in WordPress

I would like to be able to organize properties (real estate) in projects. Every property will be assigned to a project. Some properties will be assigned to the same project. This would likely be done ...
0
votes
0answers
49 views

Workaround for PHP Limit for image upload: How to use a local installation to get images online?

I have the common problem while uploading images, that I get the fatal out of memory error. Fatal error: Out of memory (allocated 40632320) (tried to allocate 5120 bytes) in ...
0
votes
1answer
17 views

WordPress styling recent post

Trying to replicate the theme shown here http://i.imgur.com/k60YtiX.png. As you can see on the screenshot the first post is black and the second post is a grey colour. My progress so far is just at ...
0
votes
1answer
18 views

if user is admin display admin link and logout link else display logout only

Like the title suggest I would like to create a conditional with the ability to if user is admin display admin link and logout link else display logout only in wordpress. I have created this ...
0
votes
1answer
21 views

WordPress rating by views [closed]

I am trying to create a system much like the one on this website. http://i.imgur.com/0trw2c3.png What happens is, if the post has over 1,000 views it gives it a nice little icon above the featured ...
0
votes
1answer
39 views

Function returns post URLs rather than retrieving Facebook Graph API data

require('../wp-blog-header.php'); query_posts('&showposts=-1&order=ASC'); while (have_posts()) : the_post(); $url = the_permalink(); $json = file_get_contents( ...
0
votes
0answers
15 views

How to move posts in featured category on top and keep pagination

I want to move every post from category_id = 11 and 10 on top of the list and then query every other post which is only in 10th. I thought that making two loops will do the trick but there is a ...
0
votes
1answer
28 views

Registration form not registering First and Last name

I'm creating a custom registration form which works using username and email inputs, but when I include First and Last name fields it won't let me register. Here is the form: <form ...
1
vote
1answer
28 views

Add before_content and after_content to register_sidebar

Is there any way to add two new functions, before_content and after_content to the register_sidebar function? These would work like before_title and after_title, except it would wrap everything that ...
0
votes
1answer
39 views

403 (Forbidden) delete file image in themer folder

I'm having trouble with permission to delete files that are within the theme folder. All folders and files are with permission 775 and there is no error in the code , because when I use the code in a ...
0
votes
1answer
28 views

Genesis / custom template page / setting the page title and meta desc

My WP site is running Genesis. I've just implemented my first custom page template in a child theme. The template runs some PHP and makes some data available to any page based on the template using ...
0
votes
0answers
40 views

Ajax is running my insert query twice

I am working in WordPress and I run a function to insert a row in database with ajax. Ajax runs but for some reason insert operation is performed twice. Below is my code Ajax jQuery(function ($) { ...
0
votes
2answers
25 views

Add categorys to custom post type not working

register_post_type("butik", [ "labels" => [ "name" => "Butik", "singular_name" => "Butik" ], "show_ui" => true, 'public' => true, 'rewrite' => [ ...
0
votes
1answer
20 views

Adding “redirect” to a button

So, I have the following code: <?php if ( I_delete_user($user_id) || $demo_site->request_verification($user_id) || isset( $args["{$template}_button_primary"] ) || isset( ...
0
votes
0answers
29 views

Use result of first ajax call to trigger another

I am working in wordpress. I have below form 1 which is a search form and when I press search I get results with ajax. Now the result rows have button or link which when clicked should trigger another ...
0
votes
0answers
4 views

How can I set a subsection page for a plugin e.g ?page=_&subsection=subsection_page

How can I set a subsection page for a plugin ? I noticed some plugins have 2 settings pages as follows: Main one: options-general.php?page=page Subsection: ...
0
votes
0answers
24 views

Integrate my site with Wordpress login system

Hello I would lite to use the login system from wordpress and use on my other project. I found this code: require('../wp-blog-header.php'); if ( is_user_logged_in() ) { echo 'Welcome, registered ...
0
votes
1answer
18 views

Removing get_template_part in child theme

Parent Theme loads some template files in its functions.php as follows: get_template_part ('lib/login/register.php'); I want to remove this file in child theme and include my custom php templates. ...
0
votes
0answers
19 views

Ordering by custom post meta key

I'm using the plugin WP Job Manager, and have a custom field with the meta_key "rating". I want to be able to order listings by rating, using "orderby". Normally for posts I imagine it would be ...
0
votes
0answers
25 views

site_url() returns with additional backslashes

I am using site_url() function and it returns the address as http:\/\/vip.local\/cc where I can see that WP automatically adds unnecessary backslashes. Is this for some escaping purpose? I tried using ...
0
votes
1answer
29 views

Can not manually create a database ( db, user, pass ) for a plugin

So I was working on a plugin and I needed to cache some third party API access, and I needed to manually create a database upon plugin activation or upgrade. The caching stuff needs a database host ( ...
0
votes
0answers
71 views

Limit the number of successful logins

I would like to retrieve the number of successful logins of a user and act accordingly. If user logged in more than 10 times, then log out user automatically with wp_logout() or similar. I would ...
1
vote
1answer
36 views

How to build an API as a plugin

I want to create a REST API endpoint for a wordpress site where I can get a JSON response for different queries. I have tried the tutorial here, but I cant seem to figure out how it works. Do I need ...
0
votes
0answers
72 views

Genesis custom post type pagination with custom taxonomy query loop

I am trying to create Genesis pagination for a page housing all posts from a particular taxonomy. I would use the many solutions given in this WordPress Stack Exchange but I can't figure out how to ...
0
votes
1answer
34 views

How to trigger WooCommerce order complete email?

I want to be able to trigger the WooCommerce order complete email at a different stage in the WooCommerce checkout process. So I've disabled WooCommerce order complete email from the backend and am ...
0
votes
2answers
56 views

Inserting dynamic content into a page

I see this subject comes up regularly but have not seen an answer to my specific requirement yet. I'm trying to use a WordPress page as a template and insert database-sourced content (about 20 or so ...
0
votes
1answer
22 views

add custom tags for custom post type in wordpress

I have many custom post type and I want two of them to be relate by tags. These tags are only useable to these two custom post type only. like I have two custom post type 1. books 2. writer and I ...
0
votes
1answer
19 views

Trying to run website a php file is blank

I have a local copy of a website I am working on and I just found that the index.php files are almost empty. They contain only an opening php tag followed by a commend that says: "Silience is golden." ...
5
votes
2answers
276 views

Why do you need to wrap a function inside array($this, function)

I'm a newbie at PHP and wordpress so please be gentle! I'm building a plugin - following a few tutorials, getting it all working. My question is why is the function I want to call wrapped up in the ...
0
votes
1answer
43 views

Advanced Custom Fields not displaying

my php skills are pretty limited and I am pretty much stuck with the following issue. Why is my Custom Field (placed at the bottom) not showing up after the posts blocks? Here is what my code looks ...
0
votes
1answer
55 views

Get all taxonomies for all post types

I would like to get all the available taxonomy for each (custom) post type. My aim is to list for each post type, each taxonomy like category, tag and for each of these taxonomy to get all register ...