0
votes
0answers
19 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. ...
1
vote
3answers
56 views

Displaying Custom Post Types In “At A Glance” Meta Box

I found the following snippet will displays the number of Custom Post Types published in Dashboard's At A Glance widget, like this: Is there a way to turn that "81 Wrestlers" text to a link to the ...
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
60 views

Change custom post type slug from plugin options

I'd like to give users the option to change a custom post type slug in my plugin. Using this answer, I'm able to hardcode it into a function: Redeclare/Change Slug of a Plugin's Custom Post Type ...
0
votes
1answer
40 views

send email to all registered users when post expires

I have a function which, when a post is published inside a CPT after three days the page is redirected to another URL/PERMALINK. This is the code: add_action('template_redirect', ...
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
34 views

Show Custom Post Type Results

Hopefully someone can help me here. I have a custom post type and with this post type I am able to show the title in a select option. Now what I want to happen is when that title is selected it will ...
0
votes
1answer
29 views

List of all entries of custom-post-type: Add year-parameter?

I've once got help with the following function: function get_event_list( $latest = true, $order = 'ASC', $return = false ) { $yesterday = time() - 24*60*60; $compare = $latest ? '>' : ...
0
votes
0answers
46 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
36 views

Rich Custom Field for Custom Post type not saving

I am new to creating meta boxes and I am trying to create a custom field meta box that is connected to a custom post type which is created by WooTheme Sensei (Post type = lesson). I am trying to use ...
1
vote
3answers
112 views

right_now_content_table_end function not working?

I noticed recently my custom counts for custom post types are not showing on the dashboard. Im using this function: right_now_content_table_end It worked well before, Im not sure when it stopped ...
0
votes
0answers
38 views

making a glossary with wordpress

I know that there are glossary plugins in the wordpress repository. This plugins normally searches glossary terms in post content and adds a link to it. But i have not found one, that search and ...
0
votes
1answer
52 views

Have custom post type Visibility be private by default, and have radio button also set to “Private”

I have been following the advice of this answer, but ran into a glitch... The post Visibility says "Private" on my custom post, but if you click the "Edit" link to reveal the radio buttons, the ...
0
votes
1answer
64 views

Redirect to URL if x number of days passed

Let's say I have this URL: www.example.com/myCPT/post, here I want to check if 3 days has passed since the post was created to redirect to www.example.com/myCPT/post/stats. In this 3 days time frame ...
0
votes
1answer
102 views

custom post type upcoming post and past post

I want to retrieve inside my archive-CPT.php most recent upcoming post ( post with status of future) and past post (oldest published post). This is how my archive-CPT.php is looking like: <?php ...
0
votes
1answer
59 views

Updating User Meta from Custom Post Field Upon Publish Not Working

I'm trying to get the user_meta to be updated based on the custom post field type. However the information won't transfer if the new post is published by a user through a frontend form. Currently it ...
0
votes
1answer
243 views

Add an Outside Wrapper to my Header and Make it Full Width

I did reposition the <header> outside the 'wrap class' class by adding this function in my function.php /** Reposition header outside main wrap */ remove_action( 'genesis_header', ...
1
vote
0answers
89 views

Add term to custom post type on draft

I'm trying to automatically add a custom taxonomy term to custom post type when the custom post type of property is created. The action is firing but it is not adding the term. I know it is firing ...
1
vote
1answer
540 views

Set posts of a custom post type to be private by default?

Say I created a custom post type called 'Private Posts' ($post_type = itsme_private_posts) and want all posts under the custom post type to be set to 'Private' automatically when published i.e. by ...
0
votes
2answers
222 views

Page Template Dropdown For Custom Post Types

I am using the following code to create a dropdown on the edit post screen which will allow users to choose page templates for the post type. The code is working but when I try using it multiple times ...
0
votes
1answer
83 views

I want to split this into two functions

This code i will add below is for Custom Fields for Custom Post Type and GMap for Custom Post Type. Currently both are pulled by this function. I want to seperate both. One for Custom Fields and One ...
2
votes
1answer
191 views

WooCommerce product search titles only

I had asked this earlier and solved it using the Relevanssi plugin, however that plugin is now breaking things so I can't use it anymore. How is something so freaking simple made so impossible by ...
0
votes
1answer
78 views

Warning: Invalid argument supplied for foreach() [closed]

I have this code from home.php that will going to display a content from a page which has a custom post type of "about" <?php $post_status1 = 'publish'; $post_type1 = 'page'; ...
0
votes
0answers
145 views

Dynamically generate a sub-page for each ACF repeater field created

I've created a custom post type in my functions file and am using an ACF repeater field to generate custom fields, one of which is an repeater field for events. I'm trying to get Wordpress to ...
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 ...
1
vote
1answer
50 views

How to assign classes to all elements?

Is it possible to assign classes to elements of certain type? For example, all paragraphs in the post body or comment body should have class="paragraph", all unordered lists in post body should have ...
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
136 views

Display author box on just certain category posts?

I'm using this code to display a author box after my blog posts. The issue that I'm having is that it is showing up on all custom post types as well which I don't want. What I need is for it to show ...
0
votes
2answers
229 views

Notice: Undefined index: suppress_filters

I'm doing some de-bugging on a theme I'm working on and I'm hoping someone can help me please. I used this function that Justin Tadlock made to display custom post types on the blog page and with ...
0
votes
0answers
162 views

Can't preview custom post - Redirected to home page

When I click on preview in custom post types I get redirected to home page. But when I visit or view the page that have all the Custom posts in I can see all of them. I cant figure out what or why. ...
1
vote
2answers
118 views

Exclude add_filter from the admin

I've created a custom filtering facility for a front end search, which also includes a specific user group. To add the function to the search I have used ...
0
votes
1answer
87 views

Showing custom post type categories in the menu

here is my custom post type and category: //Register nav register_nav_menus( array( 'main_nav' => 'Main navigation' ) ); //Custom post types add_action( 'init', 'create_post_type' ); function ...
0
votes
1answer
63 views

Custom post type isn't working

I just built up a beta environment for testing my new Wordpress site. I didn't migrate the database; I did my own installation again and ported over my theme (it's a simple theme) to my new instance. ...
0
votes
0answers
71 views

Press this! not working

I am trying to debug a Press this function on a site {Adult Contents} This issue is, images on the page does not add up and does not show... javascript code for press this button is javascript:var ...
2
votes
2answers
384 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 ...
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
1answer
304 views

Post visibility option to theme front-end for author to select?

Is it possible to present author with an option to select visibility of a post (public, private, password) on theme front-end post adding without messing with Wordpress core? Any suggestions are ...
0
votes
1answer
193 views

Saving multiple Metabox contents

I'm putting together a fairly simple Custom Page for a friend on their WordPress site, but I'm having some real difficulties getting the contents of the Metaboxes to save correctly. WordPress doesn't ...
1
vote
1answer
41 views

Modifying Custom Post Type after registration (will it affect content?)

I have a CPT (defined in functions.php) that I have set to as non-hierarchical. A lot of content has already been uploaded into the database. If I change the definition to 'hierarchical' => true, ...
0
votes
1answer
79 views

Generate daily archive whenever any post type is added

We have an issue with our date archive in WordPress, where our daily archive (example address www.xxx.com/2013/01/09) is only generated when a post from the default post type is added. Any day where a ...
1
vote
0answers
63 views

next_/previous_post_link() `in_same_category` appears to fail when true

I'm using the Modernize theme's custom Portfolio type page. In the single-portfolio.php template, I call next_ and previous_post_link(), which correctly display links when in_same_category is set to ...
1
vote
1answer
316 views

Custom Post Types relationships

I have a custom post type for my videos. I need do related it with other post category. And i have 10 category Like this : Post Category - Video Category Tech Tech Marketing ...
0
votes
1answer
615 views

Excerpt length: get first paragraph

I'm trying to figure out if it's possible to get an excerpt from each post, grabbing the first paragraph from each one. I'm currently using the ACF plugin and have custom post types and custom fields. ...
0
votes
2answers
397 views

Apply post formats to a specific post type only?

I have the following code in functions.php to give me post format support and a custom post type 'photos'. But I would like the post formats to only apply to the 'photos' post type and not to the ...
0
votes
1answer
249 views

Function to add custom HTML into head in custom post-type list page

How can I add custom HTML/PHP file into head where custom post-type list showing like this ? Any Wordpress function can do this ? or I can only do by JS(jQuery) to append my custom content ?
0
votes
1answer
228 views

Custom Loop for custom post type. Compare by meta_value?

I'm a bit confused. I have a custom-post-type named wr_event. I'm using the code underneath to loop through all "upcoming" events (defined by the meta_key `event_date). The problem I have now is that ...
2
votes
1answer
700 views

Multiple Content Block

I'm trying to create a custom post type and would like that post type to have two content blocks. So that in the loop I can ask for content-1 and content-2 separately. I can write the code just ...
0
votes
1answer
380 views

Sorting custom post types in edit.php : Post disappear

I've got a few custom post types with different taxonomies and I have a function that adds certain categories to post list view in edit.php admin screen. Everything good there. I've also added a ...
1
vote
1answer
61 views

Want to be able to sign up subscribers as authors

I want to be able to select a subscriber an author of a post in the admin so it displays their name as having written the post, but I do not want to give them any additional privileges (if they login ...
0
votes
1answer
142 views

display custom portfolio tags

This is a part from the code that is used to display portfolio categories: $post_cat = array(); $post_cat = wp_get_object_terms($post->ID, "portfolio_category"); ...