Using shortcode within shortcode with dynamic variable

You need to apply the do_shortcode to the content itself. Example below: function test_func( $atts, $content ) { extract( shortcode_atts( array( ‘foo’ => ‘no foo’, ‘baz’ => ‘default baz’ ), $atts ) ); return “<div class=”test”>”.do_shortcode($content).”</div>’; } add_shortcode( ‘test’, ‘test_func’ ); So in other words you need to care about the shortcode that print the … Read more

Generating embed code for users to share

Try following code. This will display embed code in the bottom of the page. <?php add_filter(‘the_content’,’my_custom_embed_code’); function my_custom_embed_code( $content ){ global $post; if ( ‘page’ == $post->post_type ) { $embed_code=””; $page_url = esc_url( get_permalink($post->ID ) ) ; $embed_code .= ‘<object data=”https://wordpress.stackexchange.com/questions/160604/.$page_url.” width=”100%” height=”500″><embed src=”https://wordpress.stackexchange.com/questions/160604/.$page_url.” width=”100%” height=”500″></embed> Error: Embedded data could not be displayed. Visit <a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)