Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_custom_meta_to_content($content) {
- $queried_object = get_queried_object();
- if ( $queried_object ) {
- $post_id = $queried_object->ID;
- }
- $text = get_post_meta($post_id, 'textbox_wporg_meta_key', true);
- if( is_single() ) {
- $content = $text . '' . $content;
- }
- return $content;
- }
- add_filter( 'the_content','add_custom_meta_to_content' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement