So Magic Fields 2 doesn't have "write panels." and since MF2 is so sleek - I am thinking there is some other thing that takes it's place that I can't find.
problem is this: creating a simple page with some fields in it.
in MF1//
create some m-Fields
create a page
fill out the fields on the page
select the fields that i want as a write panel.
echo them out on the page
STRUCTURE: page>fields
in MF2//
create a page template
create a page
assign the template to the page
create a custom post type
create the fields for that post type
create a post
fill in all the fields
run a loop in the page for the post type (for 1 post)
echo out the m-Fields data
STRUCTURE: page>post>fields
so a client would have to select the post type "about" then go in there and get(the only post in there) "about" then adjust the fields... meanwhile the page "about" is never touched... seems really strange...
or --- you could put ALL of the magic-fields on "page" - which in my case would mean that there would be 100 plus fields on every page and 90 of them wouldn't have to do with that page and then couldn't be required --- which is all way too confusing for clients.
I feel like I'm just not checking a special box somewhere.
The answer is just NO.
I have since started using Advance Custom Fields plugin and you just set up your custom field sets and tell them what page or post type to appear on. I have more confidence that ACF will stay up to date then the other plug in options. Just wanted to throw that out there.
Related
One of my post types is called Events and on here I have typical things like a post title, body, event date, etc.
In the site's code (on a custom template), I am programmatically adding meta to events when a user signs up (custom array of values).
The problem is that an admin can't see this data.
I wanted to know how I could add a custom section or template so when an admin inside wp-admin goes to any given event, and edits this single post/event, they can see the metadata associated.
I want to just add a new field section somewhere, called "Registrations", and then I'd programmatically access the meta and format it how I want, put some HTML/CSS in there, etc.
If anyone could point me in the right direction I would appreciate it.
Thanks!
i am building a wordpress website for a client. i need to build 1 template type of page with a list of fields that the client can fill in to populate the page. so lets say i build a template page called Person Template. On it i have an empty picture placeholder on the left and an empty Name Field below that. On the right i have an empty "persons phone number" and "Persons email" field.
what i need to create somehow is a system that the client can enter these 4 items into wp-admin somewhere and save that as a new Person. Then they can repeat and save another Person until they have created say 100 Person pages.
How do I do this? I tried building a Custom Post Type called Person CPT. I have built a Page called Person Template. I have built some "Person CPT" posts and put them on a page but i dont know how to create the Entry Fields page for my client to use.
You're correct that you'll need to use a custom post type. To add the fields you have two options:
Add the fields using add_meta_box(). You'll then need to save this data as post meta. Then in your single-person.php template you would retrieve the meta using get_post_meta(). It's a tad cumbersome, as you need to write the markup for the meta box, hook it into an action to add it to the admin page, and verify the content before it's saved. Here's an article that walks you through it
Alternatively get yourself the Advanced Custom Fields plugin: it makes adding additional fields very quick and easy. I use it all the time.
I have a custom post type (that I'm using on a template page), the custom post type is called 'Headerhome'.
When I post say a gallery there I'm trying to get it to redirect to 'single-Headerhome.php', yet it always just goes to 'single.php'.
The name of the custom post type itself is arbitrary, the name of the templage page it's on is 'home'.
I'm really confused, I'm not the best at WP yet so when something simple like this doesn't work I have no idea how to fix it, even after pouring over the codex for an hour.
The name of the custom post type itself is arbitrary, the name of the templage page it's on is 'home'.
Reading this implies that you have a home.php file in your theme, which would automatically display as your front page of your site. This may not be what you desire? More on this here: http://codex.wordpress.org/Creating_a_Static_Front_Page
An example of a custom post type might be an Event. The Event might have custom fields associated with it, like Location, Date, Time, Description. We would probably want new Events to show up on our front page, but also would want to create a custom theme file so when a user clicks on an Event from the home page to view the Event then the Event page shows our Date, Time, Location, Description, etc. We would then create a single-event.php to do this and put in any custom code their.
So (another example), a custom post type of Fruit would have an associated theme file of single-fruit.php. If their is no single-fruit.php then Wordpress will use single.php as the default theme file to display. More on this here: http://codex.wordpress.org/Post_Types#Template_Files
Hope this helps set you in the right direction.
I have a site for a client and one page displays posts from a custom post type. Its a record label and I created a custom post type for "releases".
A page displays all releases. I need to create a dropdown menu though that allows people to alter the display of the posts by Title, Date (post's date serves as "release date"), or Artist (custom field).
How would I code the dropdown?
You would create a <select> input directly in your template for that page, assuming you have one (create one if you don't). You can then either use a <form action="" method="POST"> wrapping the dropdown or some JavaScript to submit the form to itself (that is, action="?sort" or similar to submit back into your template). Both of those are fairly simple to implement, but just say so if you're unsure.
Then, in the same template file, before your WP_Query or query_posts (or get_posts, etc), grab the POST variable: $_POST['dropdown_name'] and use an if elseif else or switch() statement to create your post query depending on that POST variable.
This is the easiest approach. Not sure what your level of experience is, say so if you got lost.
I have a Block created by a View that outputs the 5 latest posts in the sidebar. For each of those nodes, the Block contains the title of the post and the posted date.
Just for the first of those posts I'd like to display more information: taxonomy terms, author name and comment count.
In my View I can send all those fields to the Block, but now I'm wondering: How can I make those fields display JUST for the first post?
The .tpl file that displays this content gets called in a loop, so in there I'm not able to put a counter that tracks whether we're at the first post or post 2 - 5.
What is the best way to go about this?
This is what Views attachments are for. Create an attachment display type with the extra fields and a limit of 1, and attach it to the main view. Give the main view an offset of 1 and you should be all set...