Getting the_excerpt to link to child pages [closed]
Getting the_excerpt to link to child pages [closed]
Getting the_excerpt to link to child pages [closed]
You only need two small changes (1st and 3rd lines), though I also took the liberty of tweaking the classes on the div to what seemed more appropriate: <h1 class=”title”><a href=”https://wordpress.stackexchange.com/questions/67750/<?php the_permalink(); ?>”><?php the_title(); ?></a></h1> <div class=”excerpt event”> <?php the_excerpt(); ?> <?php wp_link_pages(array(‘before’ => ‘<div class=”page-link”>’.__(‘Pages’, ‘cpotheme’).’:’, ‘after’ => ‘</div>’)); ?> </div>
First, a note on how the filter functions work. If a developer has something that they want to filter/let others filter, then they apply any filters they/others have to it by calling apply_filters(). If you have a certain function that you want to filter something with, you add your function to that filter hook with … Read more
First, I would suggest that you combine your p and a tags into one line, like so: $text = strip_tags($text, ‘<p><a>’); Second, the remove_filter and add_filter should go in your functions.php file, not content.php…..move those lines to just below the $text = strip_tags….. I don’t think you need the line that has $main_content = apply_filters … Read more
Try this: http://pippinspages.com/tutorials/better-wordpress-post-excerpt-revamped/
I had installed the “Facebook Comments for WordPress” plugin. This plugin attaches a filter to the_content();. The filter contains the line wp_reset_query();. Commenting this out fixes the problem (this is sub-optimal though, because, now the client will be unable to update the plugin).
First, I wouldn’t modify the string/word length of the content. Semantically, you’re dealing with an excerpt, so let’s focus on that. Second, to limit the number of words returned for the excerpt, simply filter excerpt_length: <?php function wpse52673_filter_excerpt_length( $length ) { // Return (integer) value for // word-length of excerpt return 150; } add_filter( ‘excerpt_length’, … Read more
You need to use the_content instead of the_excerpt when you display your ‘single’ post. If you would post your code, you might get a more detailed answer.
I’m going to give you a hard-coded solution to this problem, rather than using a plugin. If you’re heart is set on a plugin that is fine – but this short code is rather simple and hopefully helpful for your purposes. This code is basically just adding a CSS class to a shortcode. First, deactivate … Read more
If you’re video embeds are always the same, I like the solution proposed by 5wpthemes, but if you want to avoid having to use a custom field ( and more specifically, remembering to do it), you could also try the code below ( which also requires the code to be very similar in every post … Read more