0
votes
0answers
18 views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
1answer
30 views

Not sure why this template for custom post type posts isn't displaying anything. What's missing?

<?php /** * Template Name: Movies */ ?> <?php get_header(); ?> <div id="container"> <div id="content"> <?php $type = 'movies'; $args=array( ...
0
votes
1answer
36 views

How to call Shortcode categories for custom post types?

Hi I'm trying to do something rather tricky in my Wordpress Theme I'm more of a designer front-end developer so its a bit of a guess work with php. Anyone have any ideas why this code only displays ...
0
votes
2answers
52 views

Inserting data into `post meta` table?

How would I be able to insert data into the post meta table? I know how querying and wpdb works but I have no idea how I can just insert it into the table. I have these two fields I want to insert ID ...
0
votes
1answer
27 views

Foreach loop returning more than one item when querying taxonomy

I am querying the taxonomy terms and then listing the posts that are under those terms. The taxonomy is basically a category for a custom post type, and the terms in it are the categories. I didn't ...
0
votes
1answer
57 views

Categories under custom post types doesn't show properly

I used a custom post type in my website: I added archive-{mytaxonomy}.php and also single-{mytaxonomy}.php. I also created a separate sidebar for my taxonomy and everything looks fine until I click ...
-2
votes
1answer
52 views

Why I obtain this error message when I try to click on the author name of a post in my theme?

I am pretty new in WordPress theme development and I am experiencing a strange behavior in this custom theme that I am developing: http://onofri.org/WP_BootStrap/ As you can see in the blog are shown ...
0
votes
0answers
49 views

How to use if statements to check and echo terms by hierarchy in a post?

I'm seeing a lot of posts on here with helpful snippets to resolve my problem, but nothing has been specific enough to help me - or I just don't understand how to make those solutions work for my ...
0
votes
1answer
14 views

Function to erase every post from a taxonomy

I'd like to have a piece of code that erase every single post from a taxonomy of a post type when triggered. How can I do it? Thank you.
0
votes
0answers
53 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
107 views

Get custom post type list for every category shortcode

I am trying to make a shortcode to list all custom posts under the category they are under. Here is my code and I am no expert of coding but i thought that this would work. If someone can tell me what ...
0
votes
0answers
45 views

Selectbox Custom Post Type

I use a dropdownbox to show all custom types. On the archive page of the custom post type it works fine. If I put dropdownbox to another site, it doesn´t work anymore. The selectbox is empty. Any ...
0
votes
1answer
52 views

Compare Two Custom Post Types Using The Same Custom Taxonomy

I have two post types, courses and testimonials, sharing the same taxonomies. What I am looking to accomplish is to check whether a course is in the same category as a testimonial. Then display if it ...
0
votes
1answer
45 views

Posts without featured image using other post's featured image

I am using the following code (see bottom) to display a custom post called 'artists'. I am also using <?php if (has_post_thumbnail( $post->ID ) ) so I can set the background of a div using the ...
0
votes
0answers
22 views

custom processing for posts

Although I'm very well aware of PHP, but I'm kind of new to WordPress. So I created this WordPress site, but there's a bunch of posts that I want them to include some PHP and JavaScript and HTML ...
0
votes
1answer
46 views

Is This Code Efficient - Or is there a better way?

I have a RECIPE WP site, that is using CPTs to handle the recipe content. The client wanted an A-Z Directory listing of all recipes. I came to Wordpress Answers and found the following code that ...
2
votes
0answers
223 views

Inconsistent temporary 404s on whole install | PHP error with post-template.php

I'm deeply confused by this one: I have a WordPress install on a Media Temple GS [one of many which work fine and are configured almost exactly the same] which is occasionally giving me 404s sitewide. ...
0
votes
0answers
76 views

Trying to combine multiple Wordpress queries

I am trying to query multiple post types and meta values in Wordpress... the query is trying to fetch event post types with a featured meta key, as well as post post types with the featured image set. ...
0
votes
1answer
29 views

Using page title as a link to term archive

i want to do something like that (pay attention to line 4): $term_link = get_term_link( $term, 'genre1' ); if( is_wp_error( $term_link ) ) continue; echo '<li><a href="' . $term_link . ...
0
votes
0answers
147 views

Custom Post Type or Custom Tables?

I am trying to build an application that takes 2 pieces of input from a user and saves it to the database. This is how users enter these two pieces of input; this form will be displayed using ...
0
votes
1answer
68 views

Return all wordpress custom posts in specific multidimensional array

How can I get all custom posts (post_type=family_guy) with their ID and all of their tags in multidimensional array? Here is exactly how I would like my array to look like: $array = array("1" => ...
0
votes
0answers
72 views

Save custom meta box data to database

I have a custom post type Events. Under Events, I have a custom meta box which selects the time and data of the event: <?php $meta_boxes[] = array( 'id' => 'event_date_option', 'title' ...
0
votes
0answers
45 views

Custom post type archive doesn't react to is_archive after use of filter

I have made a custom post type with 3 taxonomies, and a filter that lets you choose a category from every taxonomy on the archive page. When I use the filter and get results, it works like you'd ...
0
votes
1answer
59 views

Blog page showing same content as homepage

I'm trying to have my posts post on another page(blog) and my 'home' page display as my front page. Both pages have their own templates assigned to them (home for home, blog for blog). In the Reading ...
1
vote
1answer
291 views

How do i calculate the total of values of custom fields in custom post types?

So the title is a bit unclear, but here is what i have: Custom post type: Projects Custom post type: Investments        + Custom field: Amount And i have one page ...
0
votes
1answer
3k views

How to display categories of my Custom Post Type?

I have a custom post type for a portfolio: Link to the test site. What I'd like to do is to display the project categories just on top of the projects so visitors could then filter projects ...
0
votes
1answer
67 views

How to loose the image 'alt' attribute in my custom post type?

I've created a custom post type but now I cannot seem to figure out how to loose the image name (under the image) once a project is opened. When a project is clicked all I need it to show except for ...
0
votes
1answer
125 views

Taxonomy Archive: Display only one post per term from separate custom taxonomy

I am having trouble coming up with a solution for product catalog I am building using custom post types and 4 custom taxonomies. The product catalog is separated by "model", but each "model" can have ...
0
votes
0answers
168 views

Add password validation to contact form 7

I would like to add custom post type loop to the functions.php. I've created PHP function to validate contact form (contact form 7). My function is simple, but it doesn't solve my problem. My custom ...
0
votes
1answer
290 views

Add number in increment of one to DIV ID

I'm using a shortcode to display a custom post type. The shortcode contains an attribute to display only posts of a specific category within the custom post type e.g. [faq category="travel"] For each ...
0
votes
1answer
23 views

Custom Post-type not returning the right child_of

Situation I am using the Advanced Custom Fields plugin to give Custom Post Types a checkbox. If this box is checked, it should be returned by this Query. The Query works this far. The issue The ...
0
votes
0answers
29 views

How to combine Custom Post Type Pagination with $selected_id?

I have a Videos CPT, everything is set up nicely, but I wanted to add pagination. Loop begins here// $args = array( 'post_type' => 'videos', 'posts_per_page' => 10 ...
0
votes
1answer
111 views

Select Menu for Custom post Type does not save

I posted a discussion on CSS-Tricks the other day. Explaining that my Videos were not displaying on my Video page from my custom post type that I created using this tutorial. I thought I fixed the ...
-5
votes
1answer
77 views

Custom Fields within custom post type

Am newbie. I have a custom post type 'dogs' and i want just 2 custom fields in this type. A pic on the left and text on the right - repeatable fields. Anyone know how to do this? I've no clue of php ...
0
votes
1answer
194 views

How to display custom post type only on a certain page?

I have created a custom post type called 'project'. But how do I get the custom post types to display only on my main template? It's a one page website and I don't want it to direct the visitor to a ...
0
votes
1answer
38 views

Menu's breaking, now showing all page links on site

There's something quite odd happening on a site I'm working on I can't figure out why at all. I have a custom post type set up for news and categories so the user can select what type of news it is ...
0
votes
1answer
1k views

Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page

I am working with custom post types and I had trouble with the nav menu not getting the .current-menu-item on my custom post archive page menu item. In fact, when I was on that page or any of the ...
0
votes
1answer
103 views

Control content before and after custom post type loop

I am trying to create a left nav menu that contains a couple of different taxonomy lists of a custom post type. For example, the left menu might look like this... <h2>New Stuff</h2> ...
0
votes
1answer
363 views

Search that will look in custom field, post title and post content

I am looking for a way to perform a search, and while performing the search, it checks a custom field named keywords, the post title and the post content. If any of those fields have results like what ...
0
votes
1answer
42 views

Looping taxonomy in taxonomy?

So I have a CPT of references (like a dictionary kind of format for music). In it there are two taxonomies: medium_reference and reference_letter. The reference_letter lists letters A-Z, while ...
0
votes
1answer
88 views

Custom Post not working as expected

NEW EDIT I solved it, as written in answer, the problem where that variables are 'forgotten' (not so techy I know, sorry for this) when function starts. EDIT: I found the problem is this: ...
2
votes
2answers
383 views

How can I add dropdown widget/box to admin post page?

I am trying to figure out how to add a dropdown widget to the post page. The reason I ask is because I would like to be able to have a few different post classes that the user can select while making ...
2
votes
1answer
188 views

wordpress custom post type remove duplicate menu item

I've registered a new content type with following - register_post_type('news', array( 'labels' => array( 'name' => __( 'News'), 'singular_name' => __( 'News'), ...
0
votes
1answer
93 views

How to use a variable as a function name?

I'm trying to loop a function that will let users create a few custom posts, but I have a problem with the function name. Here is an example: How can I write this: function ...
0
votes
0answers
48 views

Permalink of Custom Post Type

I am trying to create a custom post type called an 'event' and have it's permalink structure be as follows: www.domain.com/events/238 where 238 is the post ID. However, when I navigate to the page, ...
0
votes
1answer
40 views

Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax

I have CPT "Dealers" and a custom tax of "States" where each post in the CPT is associated to one state. The hope is to create the header for the state then list each post in that state taxonomy under ...
0
votes
3answers
186 views

Specifying Mouseover Icon for Custom Post

I am using the register_post_type function in order to create a custom post type. I am already using the menu_icon parameter in order to set the admin icon for the post type. But, how can I set the ...
0
votes
1answer
29 views

Custom Portfolio String

I have a field on my portfolio admin page which shows the url when the user write a url(obviosly). I want to when the user write in the field, elements appear along with it. And if the field is empty ...
0
votes
4answers
468 views

Add additional field to custom post_type

I am trying to add another field (subtitle) to my already created and existing custom post_type: team (code from functions.php in my *child*theme) <?php /** * Custom Post type register framework ...
0
votes
2answers
249 views

Creating on-page options for Custom Post Type

I'm creating a plugin for creating Landing Pages. I use custom post type and custom fields for the landing pages, but i need to add some on-page options for each entry. For example i need to have a ...