0
votes
1answer
34 views

Hide custom metabox value from custom fields

Before I ask the question, I tried to added _ to the custom field, but it's not working, at least with my code. I just want to hide the value of my meta box from appearing in the custom fields. When ...
5
votes
1answer
50 views

How to protect pages with double authentication: password + email (in custom field)

I would like to extend the WordPress password protection of posts by adding extra input field for user email. So in order to see the content user will have to know the password and previously given ...
-1
votes
1answer
46 views

Create A Metabox For A Custom Field

I add videos to my WordPress posts' video format by using custom fields. I was wondering if there is any way to create a meta box in post editor (like excerpt or something) for that specific custom ...
0
votes
0answers
43 views

Using Post ID and Page ID in same function

I've written a function to display a custom sidebar, which is outputted as a sidebar. On some pages, I have a Custom Field called 'show_sidebar', which I can assign as 'false' on pages which I do not ...
0
votes
1answer
25 views

Apply comment to different post (not the current post) [duplicate]

I'm building a scrolling page website and on that page I have comment form and some posts from different categories. Comments applied to wrong post. Is there a way to choose the post I want ? ...
0
votes
0answers
73 views

How to use custom fields to enable sticky posts on custom post types?

Background: The Wordpress Answers site has two questions which ask about how to enable sticky posts on custom post types (see how to make custom posts sticky? and Enable sticky posts to custom ...
1
vote
3answers
121 views

How can I add a column/s to wp_posts table?

I am trying to sync WP with another service that offers an API that allows me to hook up their table's Update, Create, Delete to my sites. So when they create, update, or delete a row on their ...
0
votes
1answer
75 views

Order posts by separate menu order for different sub-categories

My scenario is as follows: Categories: 1. Category A - Sub-Category A1 - Sub-Category A2 - Sub-Category A3 2. Category B - Sub-Category B1 3. Category C 4. Category D The ...
0
votes
1answer
22 views

How to only allow post to be deleted if custom field doesn't exist

I have looked at both the delete_post and before_delete_posts. Neither of these hooks actually allow me to perform a check and then tell wordpress not to delete the post. Anyone got any ideas?
0
votes
1answer
30 views

If custom field is empty, use one from a previous post

Let's say you have a few custom fields (I use the advanced custom fields plugin for it). There is an extra field in posts called 'afbeelding_onder'. It is not required but on index.php within the ...
0
votes
0answers
52 views

WordPress Page Template to Display Page Title, Custom Field, and Date

I'm currently attempting to create a page template that will display all posts by the current logged in user, a particular custom field from those posts (i.e., Item Status), and the dates those posts ...
0
votes
0answers
13 views

working with newest post from plugin

I am going to write a wordpress plugin which will execute when user submits a new post. Suppose, user wrote a new post and pressed the submit button. Now, I want to save the post as a txt file in my ...
0
votes
0answers
30 views

Add a custom field to post

I want add a column to my table wp_posts with name "address". So EVERY post have address like field. But i don't know how i can manage the save from Add Post(admin)... I have looked into hooks, but i ...
0
votes
0answers
112 views

Repeating Posts Plugin Tweak

I am attempting to Repeat Posts (ie. publishing them multiple times) and found the plugin repeating-posts. However, I need to tweak it so that when I have it scheduled to repeat, it also repeats the ...
0
votes
1answer
163 views

saving/reading custom field value does not work - no value gets POSTed

I am trying to add a custom field to all my posts and of course saving/reading the value. As a starting point I took the example from the Wordpress Codex and stripped it down to bare bones. I know it ...
0
votes
1answer
46 views

custom field suit new post with in custom fields

how can i use Custom Field Suite (CFS) https://uproot.us/ to create new posts in post type. what am trying to do is create a music albums using post then create new post based off the tracks in the ...
0
votes
1answer
73 views

Guest Author - How to modify my custom function code if the guest author URL will follow a particular pattern/format?

Based on code the awesome G.M. provided in an earlier question (Use Custom Fields to Create Guest Author Link), I now have a custom function that uses custom fields to support guest authors. The code ...
0
votes
0answers
73 views

YouTube Autoposting Link and Custom Field

I have a problem. I have plugin Automatic Youtube Video Posts. This plugin is importing videos to my wordpress. It works well, but in my posts this plugin does not put the Youtube link on the page. ...
0
votes
0answers
17 views

Relating posts of one type to a post of another custom type

I am having a little trouble figuring out how to do the following. I have a custom post type 'locations'. Each location has one or many 'tourist sites' related to it and one airport related to it. ...
0
votes
1answer
869 views

Enable sticky posts to custom post_type

i have this custom post_type: tvr_apartment function custom_post_apartment() { $labels = array( 'name' => 'Apartments', 'singular_name' => ...
0
votes
0answers
118 views

How to custom sort-out editing-panel fields?

I'm developing a theme for newspaper. For some new fields like: Top Sub Heading, Bottom Sub Heading, Reporter's Name etc., I implemented custom fields (For a handy use of custom fields, I used the ...
0
votes
1answer
47 views

Delete old post with new post

Hope you can point me in the right direction, with a plugin or function. With "Contact Form 7" logged in users post their info with "Form to Post" plugin. Everything is front end. It is a big form ...
0
votes
1answer
80 views

How can I create a menu items from meta box based on users input

I have created a metabox that takes a name that the user can give as an additional name of their post. I am wondering how I can automatically create a menu item based on the name the user input into ...
0
votes
1answer
296 views

Get post meta retrieving wrong value

I created a custom meta box with a textbox where the user can enter a custom value in as an additional identification tag. I thought I had it right but when I try to retrieve the value it is giving me ...
0
votes
2answers
162 views

Hooking into the post editing screen for an existing page only

I am working on a Wordpress theme that hides the default WYSIWYG editor and replaces it with a custom module system which is fine and dandy, but I've come to the realisation if someone were to use the ...
0
votes
1answer
131 views

get_post_meta property of non object

I am getting a custom field outside the loop in header.php. I get the custom field just fine but I found that when the custom field is empty, I get an error message Trying to get property of ...
0
votes
1answer
461 views

WP_Query orderby not working with meta_value_num and menu_order

I have made a custom post type (sidebar_element) which are shown on sidebar. On each sidebar element admin can choose where in sidebar should that element be shown, ie. 'top', 'middle' or 'bottom', ...
1
vote
1answer
208 views

Better post meta efficiency?

I work with websites which require using Post Meta for Post Objects within a particular Post Type. I often add a Meta Box to a particular Post Type, to provide additional settings for the new Post ...
1
vote
1answer
525 views

Add custom field to all posts in specific category

I want to bulk add a custom field (category) with value (photography) to all posts in a specific category (photography, with Category ID 5). I have used the code below to bulk add a custom field to ...
1
vote
1answer
68 views

Query Posts With Over 1000 Views

The code below is from this link. It basically creates a hit counter, but I'm probably gonna have to do this by IP. How do I make a WP_Query, where only posts up to 1000 views can be seen on the ...
0
votes
1answer
121 views

How can I sort posts by the date and a custom meta field?

I have custom meta field that I use for the post rating. So I want to display posts by the date and the rating, but only for the posts that have specific rating. For example, I want to display posts ...
0
votes
3answers
199 views

Display a custom field rating system in the front end

I have added a content rating system to my platform where the authors can select which audience their post is appropriate for. Currently, these options are available: Unrated G PG ...
0
votes
1answer
39 views

Display code if title of the custom post matches title of other post

I have two custom posts, one called "reviews" and another called "guides". I want to display a custom field from the post reviews if the title of the two matches. Something like this: (I am not good ...
0
votes
1answer
110 views

Making a form for user to add new custom post with custom taxonomies and custom fields

I want to ask that is there a way display all my custom taxonomies in a drop down menu with checkboxes so when the user check any taxonomy it will be slected and when the user click the submit button ...
0
votes
1answer
393 views

Why my meta boxes won't show in front post page?

I see it everywhere: in single post, in category archives etc, but in front page post not. I display the metaboxes in this way: <?php if (get_post_meta($post->ID, 'test_1', true) != '' ) { ...
0
votes
1answer
238 views

Add custom field automatically (add_post_meta) with value based on number of words of article

In this topic our friend @toscho created a function that sets the font size according to the number of words in the post. Based on this function, I want to create a custom field whose value will be ...
0
votes
1answer
85 views

Home page: using custom fields for posts and pages

in my home page I'd like to display some pages and posts title using the custom fields. Unfortunately my code prints only posts title. If there is a key "highlights" print the title. Here my code: ...
2
votes
0answers
236 views

Change post format using custom field

I'm creating a theme using the CF Post Formats plugin. But I've run into some trouble I don't know how to solve. Here's what I want to be able to do: Create a new standard-format post Enter a url ...
0
votes
1answer
85 views

Paragraphs removed when using get_post_custom()?

I'm using a custom field plugin called Advanced Custom Fields to create custom fields, but i don't think that's what's causing the problem. When i fetch the custom fields from a template using ...
1
vote
1answer
49 views

Cannot retrieve a custom RSS field from posts

The goal is to display a featured thumbnail micro thumb as a custom field in RSS. This is what I've done: //theme functions.php function rss_post_thumbnail($content) { global $post; ...
0
votes
1answer
67 views

How would I attach media/images to a post based on a ID stored in a each post's custom field

I have converted a site over to wordpress recently. I was able to import all the posts via a CSV importer, but not the images associated with each post. The post type is "machinery". The custom ...
0
votes
1answer
374 views

Adding external field to my post form (admin side) and to post show (frontend side)

I would like to add a "Source" field to my posts form so I can show from where I get the published info. Didn't know if this exists already because I'm just starting with WP. So I do some research and ...
0
votes
1answer
1k views

How do I insert a custom field in a user submitted post?

Please help! I have a form for users to submit posts, and I want them to be able to choose photos already in the media gallery based on category selected. I want to include radio buttons to choose ...
0
votes
1answer
503 views

Dynamically Add Custom Fields in Posts

I'm building a resume website and I would like to manage the data in custom fields. For examples I would have multiple meta boxes: Education, Work and Competencies In Work I can have multiple ...
2
votes
2answers
2k views

Add a checkbox to post screen that adds a class to the title

I'm needing some posts to have different title colors than others, and I figured this would be most conveniently accomplished by some sort of check box on the post creation/edit screen. How would I go ...
0
votes
1answer
217 views

How to rate a post from Admin Side / Manually?

I am working on a Mini Job Site. i want to give rating to posts manually from admin / editor side Best rated people will be on top. so visitor'll get better choice. visitor are not allowed to ...
2
votes
1answer
845 views

HTML code in Custom field

I'm using a custom field to display images in a slider on each post, but when I update the post after having entered the HTML code in the custom field, the code disappears. I'm assuming that there is ...
4
votes
1answer
741 views

Update all posts automatically when using post_meta

I recently created a new site using wordpress but I'm a rookie - everything I know is trial and error with no formal training. So please, please, please keep your answers as simple as possible. Thanks ...
0
votes
1answer
436 views

meta_box or custom_field as a second tinymce post-instance?

probably a rather weird question but I have no idea if this is possible or not!? I created a custom-post-type to handle events. An event always has a future date but once this date is over I want to ...
2
votes
1answer
1k views

add_meta_box: Datepicker like the one for postdate?

I've built a custom post type called "Events". Each event has a future date and I don't want to use the normal postdate of the post. I want to use add_meta_box to add some inputs for this ...