Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
2answers
20 views

upload images on front by user using form

I'm using a form on my website using wordpress to allow users to create posts. It works perfectly fine, I'm abble to assign the posts to a custom post type, add Advanced Custom Fields, content, ...
0
votes
1answer
16 views

How can I remove the “Add New” button in my custom post type?

I have many custom post types that need the Add [custom post type] feature but I have a custom post type of "About" and I do not need to "Add New" about to the about custom post type. So I want to ...
-4
votes
0answers
18 views

`php` or `wordpress function` , best way to become a `wordpress` master? [on hold]

I'm relatively newbie in wordpress, and need to become a semi-master wordpresser in about 2 months. I read "Wordpress the missing manual" and somewhere in the book I read that its better to work more ...
0
votes
2answers
35 views

Wordpress most popular post own code, per week

The plugin Most popular posts doesnt support WPML and therefor I have tried creating my own. I have found this tutorial in creating your own code for showing the most popular posts on my site. ...
0
votes
1answer
19 views

Creating customized php files in theme folder

I am developing a e-commerce theme that requires an order page. I created a php file inside my theme folder named order-page.php and hope to access this page from the wordpress root url ...
-1
votes
0answers
13 views

Wordpress crashes with W3 Total Cache [on hold]

I have Wordpress 4.0.1 with Varnish, Nginx, PHP-FPM (FastCgi), MySQL and W3 Total Cache 0.9.4. Everything worked fine, until 2 months ago. Since then, once a week my server stop responding. It looks ...
1
vote
0answers
15 views

Looking for a secure way of storing/accessing user form entry preserving newlines?

I'm allowing users to enter information through a textarea on my site. I'm aware that there is a security risk whenever a user can enter information into a site. I want to be able to preserve ...
1
vote
2answers
30 views

Upload a json file in php

I'm trying to upload a json file through PHP. This is the code that i have yet. if( isset( $_POST['upload'] )) { $target = "/"; $target = $target . basename( $_FILES['upload']['name']) ; ...
0
votes
1answer
12 views

Sort by multiple options in custom field

With use of the Advanced Custom Fields plugin I created a select dropdown which contains 6 membership types. All of my 'listings' using this custom field are assigned one of the 6. I'd like to ...
0
votes
1answer
32 views

Custom meta box with jQuery.sortable custom post type list

What I'm trying to do is have a custom post type ordered differently on different pages. I've searched around for quite a while and can't seem to find anything to help. I have a post type named staff ...
0
votes
1answer
23 views

How do I show my <p> containing my custom field ONLY if there is a set value on that custom field?

I am using the Custom Fields Plugin and have 2 custom fields assigned to my "products" custom post type. Field 1. Price Field 2 Discount Price So this is my code: <div class="wrapper"> ...
0
votes
0answers
18 views

PHP filters on a listing page [on hold]

I am asking in the hope someone cal provide a solution to below as I have no knowledge of php and have searched for hours in the hope I can find a solution to below I am creating a website - ...
-1
votes
1answer
23 views

Show div only if he has value insided - advanced custom fields plugin

Recently I installed the advanced custom fields plugin, and I want to display the fields only if there is values inside. So I used if statement and its work fine. Now I have some fields to display and ...
0
votes
1answer
21 views

WordPress Woocommerce - Product Type [on hold]

I have recently created a php script to import new products into Woocommerce. Please see how it was done here How to add product in woocommerce with php code. The question I have is related to the ...
0
votes
0answers
31 views

Use jQuery and AJAX to get HTML

I have a jquery function in my theme that should send an array of filters to a PHP file, which should then return a piece of HTML with the filtered posts (it then replaces the contents of a ...
0
votes
1answer
19 views

Display all meta for a post?

I have a custom meta field for my posts and I'm able to display the value. But it only displays one row. Since I have more than one value I need to display all of them. I know I probably have to do ...
0
votes
0answers
27 views

get_post_meta() cannot return values from nested arrays

I apologize if this question was answered on here. I searched and could not find an answer that related to my own issue. I've been turning my wheels on this for three days now and am now seeking ...
1
vote
1answer
17 views

Set the background to a default image if there isn't a specified “featured image”

I am having a little trouble displaying a default image as a background image when a feature image is not present. This is the code I am using <?php if (has_post_thumbnail( $post->ID ) ): ...
0
votes
0answers
13 views

How to center an array of thumbnails? [on hold]

I am creating our new page based on wordpress an i am creating an own theme. It should be responsive so i can ot work with a specific width of my site at all. It works quiet good expect one thing. I ...
0
votes
0answers
16 views

how to pull content from subpages only(not the parent page) to the front page

I want to pull content from from subpages of a specific page.But its pulling content from parent page also i don't want to pull content from the parent just from the subpages of that specific page ...
0
votes
0answers
28 views

How to generate custom loop indexes

Besides the regular taxonomies, such as category, tag, author, archive, I also have some special indexes to display, such as list of all sticky posts, simple chronological index of all posts, top ...
1
vote
2answers
28 views

Web Scraping with Cron

I'm currently scraping prices from three websites using xPath, but since it updates on every page load, it makes loading slow. What I would like to do is store that data and only update it weekly. So: ...
0
votes
1answer
28 views

Exclude Post ID from Array Specified in Custom Field

I have a custom field 'exclude' and the value would be a particular post, let's say 2124. Within the array I want to then call this custom field for the exclude => field but is this even possible?
-1
votes
0answers
15 views

Woocommerce - free shipping to the continental US for a specific product? [closed]

I've built an ecommerce site for a client over the summer using Woocommerce, but I would still consider myself a beginner when it comes to PHP and the backend of WordPress. I'm trying to accomplish ...
0
votes
0answers
29 views

custom field meta-box with dropdown/autocomplete

Is it possible to have a custom metabox with the ability to either: enter a new meta_value in a certain meta_key OR choose from a list of the existing meta_keys, from a dropdown/select-box, ...
0
votes
0answers
16 views

Execute PHP code of a plugin markup file

I am creating a plugin which imports html markup. I would like to execute some php on those markup files before or after it gets imported. Is there anyway I can do this? Right now if I add PHP to the ...
0
votes
0answers
21 views

Display a post based on its metabox selection

I created a client portal where a client can view their projects. I have two user accounts "Clients" and "Administrator. Both clients and administrator are redirected to the frontend of the site to a ...
0
votes
0answers
8 views

Constantly schedule posts for two weeks in advance

I was wondering if there was a way to automatically and constantly have posts scheduled for two weeks in the future. Example: I have a post that I want published every Tuesday at 1pm, and I want ...
0
votes
0answers
8 views

columns in wordpress submenu

I'm trying to get 3 columns each wrapped with a div in the wordpress submenu. I've yet to find a tutorial on how to accomplish and i've been looking all day. For example, <ul> ...
0
votes
0answers
21 views

Use own function in header.php [on hold]

I want to add a function located in functions.php to my theme, that looks like this: function if_wide() { global $post; if (get_post_meta($post->ID, 'cbLayout', true) == 'Wide') { ...
0
votes
1answer
33 views

Hide button based on PHP result

This is what i am trying to achieve but i am not sure how: I would like to check if a specific post is published or not If it' not published, it should hide a specific button and show a different ...
0
votes
2answers
65 views

How to get a list of term names of the custom post type im currently on in single.php

Ok so I have a custom post type of "Products" and a custom taxonomy of "Types". Now in the types taxonomy I have dozens of categories and sub categories assigned to custom post types. Custom Post ...
0
votes
0answers
17 views

How to build shortcode for tabs

i made a tabbed widget to display recent post , comments, and popular posts, but now i want to take out tab function from this and make a shortcode of it, so i can add it to wp posts and use it there. ...
0
votes
0answers
24 views

Passing JavaScript variable to PHP popup

I have a popup that has a list of people. The user is allowed to select up to 3 people that they would like to compare. I then would like to show them a page that's comparing the 3 people that they ...
0
votes
1answer
29 views

Displaying conditional elements based on checkbox [on hold]

I'm building a custom template for the plugin WP-Property. The great part about the plugin is that it easily allows you to add custom attributes to their own custom post type of properties. I also ...
1
vote
0answers
15 views

Change tinyMCE editor to allow marked content when pasting from Word

I'm a big supporter of how WordPress handles pasted text from Word, however for my client I need to change this. My client is marking text within Word to use as a reminder (background color). Does ...
0
votes
2answers
69 views

Cant get paginations on single.php to work with my custom post types

I'm using custom post types and custom fields plugins for my custom post types. I have all other paginations working smoothly on my website except for my single.php. I have a custom post type of ...
1
vote
1answer
69 views

Evaluations of two wordpress security plans against php code injection attack

Senario: I've posted one wordpress php code injection senario on SO before, ...
0
votes
1answer
14 views

What is the intended purpose of the _wp_attachment_context post meta key?

If the $context variable isn't empty inside wp_insert_attachment(), post meta info gets added with a meta key of _wp_attachment_context. What is the intended purpose of _wp_attachment_context? For ...
0
votes
0answers
7 views

How can i execute an external form and mysql funtion in wordpress

I have a made a form in an external page with mysql database execution containing select update and insert how can i include this page in wodpress template page and get the same results which i am ...
0
votes
0answers
26 views

Calling Theme My Login templates in a Bootstrap Modal Popup

Hopefully someone can help with this. The issue can be found at http://adopt.hatchmedia.ie. I am using Bootstrap v3 in a WordPress site. The site has a login window for users which I have set to ...
0
votes
1answer
12 views

Using cron for multiple queries

If I have something like the following in my single.php file (as a very basic example): <?php $a = the_field('test1'); ?> $b = the_field('test2'); ?> $c = the_field('test3'); ?> $d = ...
0
votes
0answers
20 views

Is custom behaviour possible when asynchronously uploading?

I'm using Plupload and making use of wp-admin/async-upload.php to allow my website's users to upload images from the front-end asynchronously. The default behaviour of that particular script is for ...
0
votes
2answers
17 views

Wordpress cron function not firing

I am trying to get a simple php function working with cron (based on a tutorial). I have the following: <?php if (!wp_next_scheduled('please_just_work')) { wp_schedule_event( time(), 'daily', ...
0
votes
1answer
41 views

writing an unique php function to be used on my website

I'm using a custom php code to translate my date format on my wordpress website, using get_the_time. I have to use this code on various spaces on my website, sometimes more than one time on a page. ...
0
votes
1answer
29 views

How to fetch results from database

I'm attempting to customize a wordpress theme. I've added custom field cp_job with form submission. This indicates if the ad is either Buyer(Buying services) or Seller(selling services), which is now ...
0
votes
0answers
28 views

Building a drop down menu for child categories

We have an auto selling WP site with a makes page with logo and a link to view all vehicles in that category. Ideally we would like a drop down menu in their displaying all models (the childs of the ...
0
votes
1answer
25 views

Showing custom field contents without listing description

I'm customizing a directory theme and my custom fields appear only if I put some text at the company's description, otherwise it will show nothing... Any idea how to fix that?? I think the problem ...
0
votes
0answers
11 views

Displaying checkboxes custom field as list

I have a checkboxes custom field, and I figured a way to show it as a list, the problem is, the name of the field shows as an item on the list, instead of for example: Items: Item 1 Item 2 it ...
0
votes
0answers
13 views

Any way to calculate distance between 2 addresses based on custom fields?

I'm working on a directory database theme, and I wonder if there is any way to calculate distance between 2 addresses or lat/long.... It can be a straight line calculation, and direction (bearing) ...