Is it acceptable to build functionality into a theme built for a client? [closed]

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

How to add text to comment form #content textarea?

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; }

Pre-fill fields with content from outside when creating a new post

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

Inserting dynamic content into a page

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

Adding content to archive and taxonomy pages on custom post types?

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