How to put limit on slider

I installed the Lite version of this theme on a test site and dug around. The function that generates the slider doesn’t provide any useful filters. However, it does store the IDs of the featured posts in a transient, so you could use the pre_set_site_transient_’ . $transient and transient_’ . $transient filters to reduce the … Read more

Remove Content edit box from ALL pages (not posts)

Found the following solution which works to remove the content editor from all “page” content. Just chuck it in the functions.php file add_action(‘admin_init’, ‘remove_textarea’); function remove_textarea() { remove_post_type_support( ‘page’, ‘editor’ ); }

How to properly Remove certain CSS / JS files from template

You can use this function that removes woocommerce styles/scripts if it’s your custom template, remember to change YOUR_TEMPLATE_FILE.php to match the specified template you want to remove the woocommerce css/js from it. add_action( ‘wp_enqueue_scripts’, ‘woo_cleaner’, 99 ); function woo_cleaner() { remove_action( ‘wp_head’, array( $GLOBALS[‘woocommerce’], ‘generator’ ) ); //dequeue scripts and styles if template matches if … Read more

Adding a filter to comments_template

Any comments_template filter should return an absolute filepath to the comments template – use comment_form_defaults and set the class_form argument: add_filter( ‘comment_form_defaults’, function ( $args ) { $args[‘class_form’] = ‘my form classes’; return $args; });

Where to place template files?

Using include makes it impossible to child theme that file. You will also find that some things that depend on global variables will not work. This is because the function that loads templates also globalizes a bunch of variables. You will also not trigger the actions attached to get_header, get_footer, and get_sidebar, which some plugin … Read more

changing posts layout in ultimate member profile plugin

Here is some basic CSS which would help make things a grid on Desktop and stacked on Mobile: .um-profile-body.posts.posts-default { max-width: 100%; padding: 0 15px; } @media (min-width: 768px) { .um-profile-body.posts.posts-default { padding: 0; } } .um-ajax-items { display: grid; grid-template-columns: 100fr; grid-template-rows: auto; margin-bottom: 15px; grid-gap: 15px; } @media (min-width: 768px) { .um-ajax-items { … Read more

Override Dokan Includes File in Child Theme

Child themes let you override templates, but these are not templates you’re attempting to override. You can’t drop in arbitrary files and override the parent theme, and WordPress can’t do it’s magic when include or require are used to load files. The reason this works for templates, is because WordPress doesn’t load them with include, … Read more