Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2

To avoid an infinite loop on transition_post_status hook when using wp_update_post(), try: add_action('transition_post_status', 'new_product_add', 10, 3); function new_product_add($new_status, $old_status, $post) { if( $old_status != 'publish' && $new_status == 'pending' && !empty($post->ID) &&...


2

bloginfo('description') just displays the site tagline. ‘description‘ – Displays the “Tagline” set in Settings > General. This data is retrieved from the “blogdescription” record in the wp_options table. https://developer.wordpress.org/reference/functions/bloginfo/#description So yes, it will be the same on every page. WordPress does not add meta ...


1

There are multiple ways to accomplish this. You could create a unique page template, enqueue a stylesheet just for the homepage, or use a unique class on the homepage. This is probably the simplest. If you inspect your homepage with the browser (press f12) and look at the body tag, you will notice WordPress is adding a .home class. You can use this to ...


1

If you want to always return post content when trying to get post excerpt, you can use get_the_excerpt filter like this. add_filter( 'get_the_excerpt', 'wp256_use_content_as_excerpt', 10, 2 ); function wp256_use_content_as_excerpt( $excerpt, $post ) { return wp_strip_all_tags( $post->post_content ); }


Only top voted, non community-wiki answers of a minimum length are eligible