Title: Setting defaults
Last modified: June 9, 2017

---

# Setting defaults

 *  Resolved [Nancy Rector](https://wordpress.org/support/users/nanrector/)
 * (@nanrector)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/setting-defaults/)
 * Is there a way I can set some of my defaults behind the scenes so I don’t have
   to do it every time. Things I would love to set the default of are LIMIT, FIELD
   SETTINGS, HTML TAG, PAGINATION
 * Not sure if any of those can be preset or not in the code. I can do it if I’m
   pointed in the right direction.
 * Thanks!
    Nancy [http://www.ourpeacefulplanet.com](http://www.ourpeacefulplanet.com)
    -  This topic was modified 8 years, 11 months ago by [Nancy Rector](https://wordpress.org/support/users/nanrector/).
    -  This topic was modified 8 years, 11 months ago by [Nancy Rector](https://wordpress.org/support/users/nanrector/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Content Views](https://wordpress.org/support/users/pt-guy/)
 * (@pt-guy)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/setting-defaults/#post-9222091)
 * Dear Ms. Nancy Rector,
    You can set default value for any settings of View, but
   it will require coding skills.
 * Please add this code to file **functions.php** of your active theme:
 *     ```
       // Content Views - Global settings for Views
       add_filter( 'pt_cv_view_settings', 'cvp_theme_view_settings', 100, 1 );
       function cvp_theme_view_settings( $args ) {
       	$prefix = 'pt-cv-';
   
       	$args[$prefix . 'limit'] = '20';
   
       	return $args;
       }
       ```
   
 * To set values for other settings, please var_dump the $args value, you will see
   the relevant keys.
 * Best regards,
 *  Thread Starter [Nancy Rector](https://wordpress.org/support/users/nanrector/)
 * (@nanrector)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/setting-defaults/#post-9237143)
 * Thank you so very much! I’m not a coder but I dabble and get do this. Very much
   appreciated. Ü
    Nancy
 *  Thread Starter [Nancy Rector](https://wordpress.org/support/users/nanrector/)
 * (@nanrector)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/setting-defaults/#post-9313521)
 * I’m not as smart as I thought… can’t figure this out as a non coder. Could you
   show me what to put in the code you gave me if I want to set the default for
 * 1. HTML Tag
    2. Under Pagination: Items Per page
 * Thank you so much!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Setting defaults’ is closed to new replies.

 * ![](https://ps.w.org/content-views-query-and-display-post-page/assets/icon.svg?
   rev=2932226)
 * [Content Views - Post Grid & Filter, Recent Posts, Category Posts ... (Shortcode, Gutenberg Blocks, and Widgets for Elementor)](https://wordpress.org/plugins/content-views-query-and-display-post-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-views-query-and-display-post-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/)
 * [Active Topics](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-views-query-and-display-post-page/reviews/)

## Tags

 * [defaults](https://wordpress.org/support/topic-tag/defaults/)

 * 3 replies
 * 2 participants
 * Last reply from: [Nancy Rector](https://wordpress.org/support/users/nanrector/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/setting-defaults/#post-9313521)
 * Status: resolved