The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged


As majick suggested on a comment you could use a shortcode to create the accordion markup. If you want to manually define the tab titles and content, you could add something like this to your functions.php. add_shortcode( 'accordion', 'accordion_callback' ); function accordion_callback( $args, $content ) { $defaults = array( 'id' => '...


No, WordPress does not pass any arguments to the hook's callbacks. And you can use that hook to display something after the embed excerpt is displayed. But this is of course, if the theme is using the default embed template for post embeds — with custom template, you could, if you want to, display the entire post content. And the embed excerpt is ...


If I understand correctly ... first of all you need to match everything inside paragraphs using regex. $content = "<p>some text which includes test1 and test2 etc</p>"; preg_match_all("/<\s*p[^>]*>([^<]*)<\s*\/\s*p\s*>/", $content); then you can use your code.

Top 50 recent answers are included