Tag Info

New answers tagged

1

Take a look at the default Twenty Fourteen theme code in index.php <?php if ( have_posts() ) : // Start the Loop. while ( have_posts() ) : the_post(); /* * Include the post format-specific template for the content. If you want to * use this in a child theme, then include a file called called ...


2

Lets first start with a bit of knowledge-base: the_content is this /** * Display the post content. * * @since 0.71 * * @param string $more_link_text Optional. Content for when there is more text. * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false. */ function the_content( $more_link_text = null, ...


1

You could initialize the video shortcode - [video] - with the function do_shortcode. Exemplary usage would be like this: echo do_shortcode( '[video src="your-source-file.mp4"]' ); Extra information: I have given an extensive answer to a similar question a couple of weeks ago. You should take a look I'm certain it will help you out. Especially if you ...


0

It's probably unorthodox/unnecessary if you can change the templates, but under certain conditions it might be necessary. I realize this is an old post but just came across it and realized I actually do this a lot with output buffers. In the below example I'm removing the pingback link in the You can use string replace or preg replace for more advanced ...


6

Prevent authors from publishing too short content: Here's one idea using a custom post status, for example short: /** * Register a custom 'short' post status * * @see http://wordpress.stackexchange.com/a/159044/26350 */ function wpse_short_post_status() { register_post_status( 'short', array( 'label' => _x( 'Short', ...



Top 50 recent answers are included