Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

having youtube videos naturally appear in category.php file WordPress

  • SOLVED

hey everyone

i hope this isn't a biggy i dont think it is.. :)

on the normal twenty 11 theme, when ever i post a video in a post, when i display the category containing all those posts the category page naturally lists all the videos as posts on the page, like a video blog roll please see,
http://www.topofthemorning.co.za/comc1.JPG

however i bought a template with the intention of displaying my category pages as above, but i didn't realize the template displays category pages differently, it just shows a small excerpt and not the video, however i'd really like it to display the videos, and maybe a small excerpt if there is text?

http://www.topofthemorning.co.za/comc2.JPG

how do i edit the category page to allow the videos to naturally show on the roll? instead of showing excerpts.. how do i display the natural content of the post?

Thanks so much


Answers (5)

2013-01-09

Asad Iqbal answers:

Please check the following article, hope it will solve your problem:

http://heera.it/show-vipers-video-excerpt


Mike Peters comments:

Thanks alot for your help!

2013-01-09

Doug Montgomery answers:

You could also use the Ultimate Tinymce plugin.

http://wordpress.org/extend/plugins/ultimate-tinymce/

You can enable the text editor on your excerpts and it will give you unlimited possibilities. Simply use the excerpt section for your content.

Under WP settings go to Ultimate Tinymce. scroll down to the admin settings and check off "Enable Ultimate Tinymce in the excerpt area of Posts."

If you havent' used it before you should watch the video on it. It's got a lot of great features you'll surely love.


Mike Peters comments:

Thanks for your help i got it sorted! :)

2013-01-09

phppoet answers:

for this you should put your youtube video link in first 400 characters (you can choose any number in place of 400 ) . And then display that characters into category.php instead of excerpt . to use this replace these line in category.php

get_template_part( 'content', get_post_format() );


with

$string2 = $post->post_content;
$newString2 = substr($string2, 0, 400);

echo $newString2;


Replace 400 with the number of character you want to display .

tell me if you face any difficulties



Mike Peters comments:

Thanks for your help i got it sorted! :)

2013-01-09

Monit Jadhav answers:

You need to locate the category.php file that is your categories template.

There are two possibilities in it either loop would be right in the categories template or its code content would be coming from some other file.

if you happen to see the code liks

get_template_part( 'content', get_post_format() );

you will have to edit content.php

or

get_template_part( 'content', "category" );

you will have to edit content-category.php

in that find and replace <strong>the_excerpt()</strong> with <strong>the_content()</strong>.

thats it

It should resolve it.


Monit Jadhav comments:

what theme are you using can you send code of category.php?


Mike Peters comments:

Thanks for your help i got it sorted! :)

2013-01-09

Arnav Joy answers:

try to use this in your functions.php

remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
remove_filter( 'the_excerpt', 'wp_trim_excerpt' );


Mike Peters comments:

Thanks for your help i got it sorted! :)