Tag Info

New answers tagged


You will want to read up on get_post_meta(). Here is a link to the WP Codex reference for that function. <?php $meta_values = get_post_meta( $post_id, $key, $single ); ?> If you created that custom field with something like Elliot Condon's ACF plugin, the documentation for the plug-in is also helpful in meeting your exact need. Assuming you are ...


The body_class() (see Codex) is a function that displays classes depending on the query. In other words: Depending on where you are, it outputs different classes. You can as well append your own - either directly as argument or with a filter: // Directly in your template <body <?php body_class( 'your-custom-class-name' ); ?>> Example for a ...


You can Directly edit functions.php file and put your own function their function remove_loop_button(){ remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); // hide product price on category page remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10); } ...


There is an excellent tutorial here!


As an alternative to filtering, this method would be used to replace <title><?php wp_title(); ?></title> in your header.php file (ideally in a child theme). bloginfo('name','description'); will display the site title and description. From Function Reference/bloginfo 'name' - Displays the "Site Title" set in Settings > General. ...


In any properly coded theme the title should be completely generated with wp_title() and easily filterable to specific string (in functions.php or otherwise): add_filter( 'wp_title', function () { return get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' ); } );

Top 50 recent answers are included