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

learn more… | top users | synonyms (1)

0
votes
0answers
4 views

Passing arguments to a admin menu page callback & add sub menu page?

I want to function add_submenu_page function html_panel Re-run. but Runs only once. This means that each page will have an increased number.But the number 1 show all pages. <?php $counter = 1; ...
0
votes
0answers
13 views

How to use plugin only for specifict page template

I installed welcome message for wordpress like text which is fading out after some seconds automatically and it has no option to set it only on a main page. I'm interesed is there a way to use this ...
-3
votes
0answers
8 views

How do i get facebook chekins to wordpress site [on hold]

How can i get only facebook checkins to site . I want to display checkins from facebook to site.
0
votes
0answers
11 views

PHP > Scheduled Tasks > Sending daily email with dynamic API variables

I'm trying to write a PHP cron job that would call an API, return a set of numerical variables, calculate a second set of variables, and send an email to selected recipients with those variables ...
1
vote
2answers
34 views

Making plugin unique to not conflict with plugins with the same name

I have plugin that has the same name as other plugin uploaded to wordpress.org How can i make it unique so it doesn't share "View Detais" link and auto-update with other plugin uploaded to ...
0
votes
0answers
15 views

How do I change the button “comments”?

How do I change the button "comments" in theme twentyfifteen to "..."? I'm assuming it's in the comments.php file? I could be wrong. I'm referring to this area. prntscr.com/89nr1q <?php /** * The ...
0
votes
1answer
19 views

how to get attached file url for current post?

Trying to get the attachment file url for current post, using this code: if ( is_singular('post') ) { $args = array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => ...
0
votes
1answer
15 views

How to style injected code in header section?

Trying to add custom code to header section <head>..</head>of the blog by adding this code to child-theme functions.php // Add scripts to wp_head() function child_theme_head_script() { ...
1
vote
0answers
10 views

Detect a focus on wp_editor

I wan't to detect/callback when a wp_editor(..) output text-area/content-editable is focus. Quite a simple question that I could not find anywhere. <div class="compose-body"> <?php ...
0
votes
0answers
16 views

how to print variables in wordpress 4.3?

A few months ago I wrote a little woocommerce plugin that does some curl requests. So far so good just that a few days ago I updated my Wordpress to 4.3 and Woocommerce to 2.4.5. Now I can't var_dump ...
0
votes
2answers
19 views

Rearrange get_categories array compared to another array

I've got a function that pulls the latest post from each category and arrange categories by latests posts. What I get from this is an array with category ids which I want to use to rearrange the ...
0
votes
0answers
11 views

Numeric values associated to admin menu bar

I'm customizing my admin left hand menu and am having an issue coming up with some of the numbers. I've even gone through the option of counting as I save out my code to confirm their sorting order ...
1
vote
1answer
22 views

max_input_vars: how many am I using?

I'm processing a large amount of Options in a Wordpress theme. I want to ensure I keep below the default 1000 before hitting a max_input_vars error. Is there a way to test how many 'input_vars' I'm ...
0
votes
1answer
22 views

Allow user to Upload image and manipulate it on the frontend

The site I am working on allows users to post things up for sale. In the form for creating their post, there is a simple file upload field. The problem is that sometimes when users upload images they ...
0
votes
1answer
39 views

How to get the first letter from custom field?

I have a custom field 'first_name' created by ACF advanced custom fields. I use this code to get the value from the field: the out put would be something like Mark. What I need exactly is getting ...
0
votes
0answers
25 views

Is there a hack for using is_page() within the function.php file?

I've created a function in my functions.php that's called when the submit_form event is fired on the front-end. Here is the code: add_action( "wp_ajax_nopriv_submit_form", "submit_my_form" ); ...
0
votes
1answer
25 views

How to style options page in dashboard?

working with a child-theme, adding a custom options page to dashboard in which admin can save details about the site. Using this code in the child-theme functions.php to create the options page: ...
0
votes
0answers
20 views

Problem creating menu shortcodes

I'm trying to setup three shortcodes, each to display its own unique menu block. Just two are shown in the code below because I ran into an issue. The problem I am having is that both [footera] and ...
0
votes
0answers
17 views

Remove Sidebar from Specific Product Category “Slug”, “not all” | Wordpress Woocommerce

My question is, Can i remove the sidebar only for particular URLs of my side. If the url is like below - remove the side bar and make the page full wridth ...
0
votes
1answer
24 views

Meta box not saving spaces

I got a meta-box. And it is almost working as it should. Except that it is'nt saving spaces. For example if I enter London City the data saved will be LondonCity I have taken a look at this SE: Why is ...
0
votes
0answers
19 views

Setting up automated post status change / delete system

Haha, first of all, I've been asking all my WP questions in stackoverflow and then wondered why everybody said they don't know nothing about WP. My question is simple: What's the best way in your ...
0
votes
0answers
5 views

Textarea - TinyMCE

Can you help me please? I downloaded the plugin wpDiscuz and I need to "textarea" embed TinyMCE. part of the code: <textarea <?php echo $wc_validate_comment_text_length; ?> ...
0
votes
0answers
19 views

How do I prevent an infinite-loop. wp_insert_posts + JSON

I'm downloading posts from JSON file with this code: $bands = json_decode(file_get_contents('json file url'),true); $arrayLength = count($bands); for ($i=1; $i <= $arrayLength-1; $i++) { ...
0
votes
2answers
20 views

Display Post co-authored in Author Page

I am using co-author plus and I have posts in my site that are done by multiple authors. I would like that when I click on the co-author's author page, I will be able to get the posts that he/she ...
0
votes
1answer
28 views

Changing code to remove 2 records for the first line

The code below grabs the first two records and displays them on the first line. All the other records are displayed after that but three per line. Each record has these four fields: name, ...
0
votes
1answer
27 views

WooCommerce Link to Product Category

I'm creating a template for archive-product.php page in WooCommerce. I would like to have 3 boxes and link each to a different product category. How do I get dynamic link to each product category ...
0
votes
0answers
11 views

Adding skin script ads to header in multisite

I need to know where in the header.php I can insert a script ads so it looks like the background (the classic advertising side to a site boxed.) I am a multi-site thought to use a facility code like ...
0
votes
1answer
30 views

How to create “page” used for generating PDF? [on hold]

I am new to wordpress but I do have some knowledge base in php. I am developing custom theme for my Wordpress site. I also have a PHP file which generates PDF file based on GET parameters and it's ...
0
votes
0answers
11 views

How to separate website pages from the home page and make custom?

I have installed a theme on my wordpress and published some new links to my navigation. Until now i have my main "home page" customized and i want to costomize the next page "our products". But all my ...
0
votes
1answer
20 views

add class to background image

I'm trying to make a wordpress theme, using as framework the twitter bootstrap. On one page template I need to use the featured image as a background image, so I used this code: <?php global ...
0
votes
0answers
13 views

Workflow for developing an e-commerce website with Wordpress [on hold]

I need to develop a e-commerce type website with some typical modifications in it. I want to develop the front-end by myself and I need some extra functionality it, it will be something like a ...
0
votes
2answers
23 views

Query for user roles

How do I query for a specific user role? if (is_user_logged_in() && user_role == "user") {} The part I'm unsure about is user_role. Is there a way I can ask WordPress to check for a ...
0
votes
2answers
8 views

use system script advertising in wordpress multisite

I have a little problem that I can not solve. I have a website "multi-site" system with ADS script. I wish I could enter leaderboard banner. This is an example script: <div id=""><script ...
0
votes
1answer
12 views

problem multisite with blog id

I have a little problem that I can not solve. I have a website "multi-site" system with ADS PRO scripteo. I wish I could enter leaderboard banner. After that I created the shortcode: ...
0
votes
1answer
14 views

Display tab title as 'blog tagline | blog title'

I am currently displaying my title liek this <?php wp_title( '|', true, 'right' ); ?> it works fine for every page besides home page where tab currently says Blog title | Blog tagline is there a ...
-2
votes
1answer
23 views

Undefined variable notice [on hold]

function custom_content_filter_the_content( $content ) { $colorsList = array( 'Baby Blue' => "66CCFF", 'Beige' => "CC9966", 'Black' => "000000", 'Blue' => "0000CC", ...
0
votes
0answers
17 views

Putting simple php textbox and submit form in a customize wordpress plugin

Can anyone have a suggestion on how to hook a text box and submit form using word press? I tried to put a simple textbox and submit form but nothing happens. Maybe because of the way on how word press ...
0
votes
0answers
9 views

How to add custom section in backend which will display information on frontend?

I'm newbie in wordpress so please dont judge. So what I want : I have post div like 1:featured image 2:title 3:category - in one div. I want to add one more custom section like one more "title" ...
0
votes
1answer
30 views

Can't pass the variable from a select to PHP query

I'm trying to make a dependent drop down with AJAX. I managed to get the chosen variable but I can't pass it to the PHP. Here's my code: action.js window.onload = function($) { ...
0
votes
0answers
24 views

To get the data from the Database is not working?

The below code is reponsible to display a dropdown options that while selected a options a google map was appeared. But when I put the shortcode into my page the options are being shown. But the ...
0
votes
0answers
31 views

[jQuery]Autocomplete and $.post

I managed to solve it using Sisir's push in the right direction. Here's the javascript function: function render_edu_hook_javascript() { ?> <script type="text/javascript"> var ...
1
vote
0answers
37 views

How to change array indexes in php [migrated]

I am working on a plugin. In plugin upload multiple images and save them in an array in database. In previous version when i save them in database i start their indexes with [1][2][3].... Array ( ...
0
votes
2answers
30 views

wordpress ajax contact form - error 500

I've tried to create a simple ajax contact form plugin. all things seems good till user push the "send" btn. it sends error 500. this is my script.js codes: jQuery(document).ready(function(){ //Get ...
0
votes
0answers
19 views

Front-end visual composer like Medium.com for Wordpress? [closed]

I am building a site that needs a front-end composer similar to Medium.com's. Is there is a plugin out there that can do this type of thing? Currently I have Gravity Forms and a simple front-end ...
0
votes
0answers
23 views

Cant get “get_queried_object_id()” to work on a category.php page

I am making a category based site with images for every category. I am unable to get the part with get_queried_object_id() to work correctly. At present, I have made it work with the top categories. ...
0
votes
0answers
9 views

wp_editor with custom editor_id not working

When give editor id like my-form[myeditor] form wp_editor doesn`t work and text editor (Html tags) only shown not also visual editor $settings = array( 'media_buttons' => false ); ...
0
votes
1answer
19 views

help with custom shortcode that stopped working

A while back I wrote a shortcode for my site, and it just recently stopped working. I'm wondering if someone can help. The shortcode is called paramtext. What it does is check the value of a certain ...
0
votes
0answers
10 views

rewrite_rule - working fine but broken single post 404

I'm having an issue with my rewrite rule, works fine here: example.com/resources/ example.com/resources/articles/ Also works fine with the pagination here: ...
0
votes
1answer
8 views

media_handle_sideload() returned post_id being incremented

Currently I'm trying to take screenshots of websites. That works great by using mshots and media_handle_sideload. However these screenshots need to be associated with my post. I've made a function ...
0
votes
0answers
18 views

External SQL Database (Login Details) to update wp_users with new users

I have an external database which currently has a Username and Password field, which are plain text (password field not using any hashing). Is it possible for when I update this database that it will ...