How to create a list of items with fields in WordPress?
Try the pods CMS plugin: http://podscms.org
Try the pods CMS plugin: http://podscms.org
while agreeing 95% with Drew’s answer I would like to attend to another point It’s normally advised to not include custom types or taxonomies in themes as the themes will be less useful to other users, and would not be accepted by the WordPress theme repository. The word of the maintainers of the wordpress.org repository … Read more
1) Yes, there’s better ways…one would be to use a shortcode instead of storing php in your db. Write and register a shortcode callback that reads your file and returns the content and replace your <?php … ?> section in the post with the shortcode. Also, you can read the file with file_get_contents();, saves you … Read more
If you wanna call content of one page to another page then for that you need to make custom template. For example if you have 2 pages (page a and page b) then make template for page a. And now you want to add content of page b into page a, this can be done … Read more
You can filter ‘comment_form_defaults’ to change the textarea. You get an array with the default fields as argument: add_filter( ‘comment_form_defaults’, ‘wpse_67503_textarea_insert’ ); function wpse_67503_textarea_insert( $fields ) { if ( /* your condition */ ) { $fields[‘comment_field’] = str_replace( ‘</textarea>’, ‘EXTRA CONTENT</textarea>’, $fields[‘comment_field’] ); } return $fields; }
An empty post is created by get_default_post_to_edit(). This function reads the post_title, content and excerpt values in the $_REQUEST array, and also filters them through default_title, default_content and default_excerpt. By default this function only returns a “fake” $post object, but if the $create_in_db parameter is set to true, it is actually saved in the database … Read more
As you are building a page template, you can insert in the content of that template whatever you want and use any PHP snippet you want. So, you can continue doing it as you was doing in PHP. For example, this could be your page template: <?php /* Template Name: My template */ get_header(); ?> … Read more
This is an interesting question, though a bit too broad for a Q&A model. Here is what I would do: Create a custom post type, where each post is a block of content Create a second custom post type for pages that are assembled from blocks of code. In stead of a content field, create … Read more
First solution can be using the Settings API and create 2 fields “Products Description” and “Usage Description”, after that showing in your template that fields is easy like a: $options = get_option(‘my_theme_options’); echo $options[‘prod_description’]; // echo $options[‘usage_description’]; However, settings API is not the best part of WP core, and probably create a settings page for … Read more