0
votes
0answers
11 views

How to get values from wordpress listings and use them in javascript array?

I'm trying to get values (latitude, longitude and an image) from the WordPress database and put it into a javascript array. Unfortunately I'm a newbie at Javascript and PHP! Here is the code I have ...
0
votes
1answer
40 views

Repeatable field within repeatable group of fields

Compounding on Saving metabox repeatable fields ... I've created a metabox with a series of fields that are repeatable. However, within those fields, I'd like to create another field named Choices ...
-3
votes
1answer
17 views

Retrieve Array from within Array [closed]

I have an array being created within another array in Wordpress and I need to get the ID value from each Array. This is the code I am using to pull the array <?php $pages = get_field('products'); ...
0
votes
2answers
34 views

Grouping posts by a custom meta value

I'm trying to output a list of dates that are held in a meta key called event_dates without duplicates. I've also tried a wp_query with a meta_compare but I'm not able to make that work either. Any ...
0
votes
1answer
49 views

Adapting a php array to WordPress

The guys over at the other Stackoverflow said I should post this here. I've been reading and tweaking code for three days and can't figure this out, because I'm new to php. The developer that wrote ...
0
votes
1answer
221 views

Update value of a associative array with update_post_meta

I am trying to change the value of a specific key of an associative array which was saved in my post meta. This is how my array is saved in a custom field: Array ( [0] => Array ( ...
0
votes
1answer
254 views

Metabox repeating fields - radio buttons not saving correctly

I have multiple radio buttons set up inside of a metabox in a custom post type. I have created the metabox like so: add_action('admin_init', 'add_meta_boxes', 1); function add_meta_boxes() { ...
0
votes
0answers
27 views

How to put a select option in jigoshop checkout?

Am I doing the right thing guys? Please help me. What I want to happen is to put a shipping time in billing address. Help me please. Thanks array( 'type' => ...
0
votes
1answer
35 views

How do I create a numbered list with PHP? [closed]

I'm having some difficulty functioning this morning! This isn't specifically WP (more PHP), but I think that it would benefit WP devs in the future, so I'm asking here. I'm trying to create a list ...
0
votes
0answers
75 views

How to get duplicate array count with custom post type

After printing array I am getting output like this: Array ( [0] => WP_Post Object ( [ID] => 8 [post_author] => 1 [post_date] => 2014-01-31 ...
0
votes
1answer
38 views

How to make sure relative URL works when site is not on root domain?

I just tried installing my theme on another WP install that lies in a subdirectory of the domain. I never really thought too hard about subdirectories, but it does happen so I know I need to change ...
0
votes
0answers
75 views

wp_get_archive for category returning different URLs on different but similar sites

I have this code on two different sites in the sidebar: <ul class="news"> <?php wp_get_archives('cat=2&show_post_count=true'); ?> </ul> and this code in the main content ...
0
votes
2answers
79 views

Get URI from PodPress using PHP

We're using podpress as our podcast player, but we'd like to give the option to download the file on a page without a player. So I'm trying to figure out how to extract the URI from the metadata. I'm ...
0
votes
0answers
132 views

Advanced Custom Fields Repeater sorting by category

Basically in my ACF repeater I have a select field and I want to display the content in sections that relate to the value of the select field..? Example: In the select field I have four options.. - ...
0
votes
1answer
64 views

Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?

I have a function that is designed to do two things: 1) create color picker controls/ settings in the customizer and 2) create a multi-dimensional array $customizeData to be outputted in header styles ...
0
votes
1answer
71 views

!in_array doesnt recognize category

I want to fill an array with categories and tried to prevent duplicates with in_array: if ( $query->have_posts() ) { $categories = array(); while ( $query->have_posts() ) { ...
0
votes
1answer
243 views

How To Pass Array To get_the_category_by_ID() and Get An Array Back?

I am trying to pass an array of category IDs to get_category_by_ID() in order to get an array of category names back. Since I'm still trying to get this to work I'm just using var_dump() on the ...
0
votes
1answer
151 views

using images in next/previous_post_link [closed]

In my blog's pagination section, I've used <?php previous_post_link(); ?> and <?php next_post_link(); ?> to generate the newer and older posts links. Within that action, though, I've ...
0
votes
1answer
433 views

Exclude a 'portfolio' custom category?

I have a custom post type called 'portcat' and I want to exclude one portcat category ('weather' - ID='5') from the page. I've tried 'category__not_in' => array( 5 ) but apparently this doesn't work ...
1
vote
1answer
161 views

get_the_tags() not iterating through for/while loop, but will with foreach

I'm having a very peculiar issue with Wordpress right now that I can't understand, and hopefully someone here will have experience with it to help solve it. I'm trying to iterate through the array ...
0
votes
1answer
241 views

Finding and removing duplicates within WP Arrays

I'm looking to see if it's possible to find and remove duplicates from the arrays generated below. I've tried array_unique array_merge and they haven't worked. $category = get_the_category(); $tags ...
0
votes
1answer
74 views

get_permalink returning first letter

I'm trying to use an ajax function in my custom template to retrieve a post's custom fields to show a post overview. Getting the custom fields is working, but the getting the permalink isn't. I'm ...
0
votes
1answer
134 views

get a simple array of all of the term names that exist in all taxonomies

I may be going about this all wrong but I'm trying to use get terms to get all of the terms that exist in every taxonomy. I think this might be a php question. get_terms allows you to specify which ...
0
votes
1answer
77 views

posting twice from an array?

I dynamically create iterations of a form field with jquery, but they all carry the name extrakosten[] for the first variable and the other variable vergoeding[]. The php: $postTitle = ''; // save ...
0
votes
1answer
213 views

Insert dynamic content into posts

I'm currently using this plugin http://wordpress.org/extend/plugins/automatic-featured-image-posts/ which creates batches of posts from uploaded images I'm also using this code here to generate the ...
-1
votes
1answer
105 views

Use php array outside his function

any ideas why my function print_r $arr with lot of elements, but only retain cat and dog when it comes to print_r $stack? I need to have $arr used outside the function, function ...
0
votes
1answer
259 views

Using multiple variables to assign categories to an array

I have php set up in a template file to check a form and see if 1 or more of 5 categories is selected. Based on which one is selected, I want the custom query I'm using to change in that the array for ...
0
votes
1answer
98 views

Showing all post from all post type in admin backstage

I try to create an admin page where to display all posts from all custom post type. It is something like in edit.php, but instead of displaying single post type,I would like to display all posts in ...
0
votes
1answer
143 views

How to use array in function to get only value I want

I am trying to work this function in wordpress theme the way where I can get value only what I want and not all to gather. I am not much familiar with using array in function so I need you expert help ...
0
votes
1answer
124 views

Error while setting role

I already got code which can change role basis on post count. <?php add_action( 'save_post', 'update_roles' ); function update_roles( $post_id ) { if ( defined( 'DOING_AUTOSAVE' ) ...
0
votes
1answer
518 views

Get categories names as an array to use it in theme settings

I am building a theme and for the Theme Settings Page I followed this tutorial: http://wp.tutsplus.com/tutorials/using-the-settings-api-part-1-create-a-theme-options-page/ What I want now is to have ...
1
vote
1answer
370 views

PHP get the first post separately from array returned by wpdb->get_results()

Apologies if the title isn't clear, can't quite think how to word this. I'm getting a pretty standard list of posts like this: $pageposts=$wpdb->get_results(" SELECT * FROM ...
1
vote
2answers
3k views

Working with query_posts ( arrays and query strings)

I'm trying to use the search query along with an array of arguments to narrow down search results, but I'm failing horribly. This is what I have so far. $paged = (get_query_var('paged')) ? ...
0
votes
1answer
276 views

Categories Listing and Highlighting current category item

My query is on Wordpress and related to categories. I have a set of categories for my posts: All, Cat-a, Cat-b and Cat-c. a. When I click on the link to my posts page, I want to show an archive for ...
1
vote
2answers
477 views

Make Selected Mutiselect Items “selected”

I'm developing a theme settings panel for a new wordpress theme that have an option to exclude categories from being shown in the loop. I managed to get the main functionality to work, using a ...
1
vote
0answers
92 views

Unable to reorder the calendar using the WP Calendar plugin [closed]

This question is particular to the plugin "WP Calendar". The events are outputted in ascending order rather than descending which would make more sense since the newest should appear first. See the ...
0
votes
2answers
143 views

Alter required message using comment form api

I prefer not to use asterisk markers on required fields in the comment form. So I'd like to remove or alter the 'required fields are marked (*)' message. Being a good wordpress user, I'd like to do ...
0
votes
1answer
306 views

Custom functions for string data calculations

Just a quick question. I have a form that calculates values based on user entry. The information is then passed via ajax to a php file for calculation returning the results. The problem is that that ...
0
votes
1answer
135 views

Add custom fields from different posts

I am trying to add up custom fields from different posts. The array I created is not working. Here is the code. <?php $totalpricearray = ...