Joshuwar
Forum Replies Created
-
Forum: Plugins
In reply to: [Default Featured Image] default featured image problemMy mistake- the plugin was fine, I had made a mistake with a db import so the posts thought they had images set even when they didn’t…
Sorry!
Forum: Plugins
In reply to: [Taxonomy Meta] Plugin brokenHey cangpo and sumobi,
Just been poking around in the taxonomy meta plugin, and I think if you change line 518 to:
call_user_func( array( $this, 'save_field_' . $type ), &$meta, $field, $old, $new );
(ie. adding the ampersand to the $meta variable), the error doesn’t get thrown.
I haven’t tested whether this is watertight but it seems to work now at least.
Forum: Fixing WordPress
In reply to: executing shortcodes through get_the_excerpt();Interesting… So I searched for the
add_shortcode()
call in the plugin, and it wasn’t there. So I had a look for the mechanism it was using. It seems that it was doing apreg_replace
on the shortcode, and dumping the results back into the content via a couple of filters:add_filter('the_content', 'sr_addstar'); add_filter('the_excerpt', 'sr_addstar');
I realised all I needed to do was add another line:
add_filter('get_the_excerpt', 'sr_addstar');
And hey- it worked.
So it was the plugin. Thanks vtxyzzy for pointing me in the right direction.
Forum: Fixing WordPress
In reply to: executing shortcodes through get_the_excerpt();Sorry I don’t follow- on my page template I tried:
do_shortcode(get_the_excerpt());
and
echo do_shortcode(get_the_excerpt());
But neither execute the shortcode. Without the echo nothing is output at all, with the echo I get the text of the shortcode included in the excerpt, as described above.
The shortcode I’m using is created by a plugin: Star-Rating-for-Reviews. This shortcode is executed perfectly when I call
the_excerpt();
, but not when usingdo_shortcode(get_the_excerpt);
Am I missing something?
Forum: Fixing WordPress
In reply to: executing shortcodes through get_the_excerpt();PS. Thanks! (:
Forum: Fixing WordPress
In reply to: executing shortcodes through get_the_excerpt();I tried that- it just echoes the unexecuted shortcode, like this:
[shortcode] the text of the excerpt
Will keep digging when I have a chance…
Forum: Fixing WordPress
In reply to: executing shortcodes through get_the_excerpt();OK. Well, for the record, here are things I’ve tried. Please let me know if anything doesn’t look right so I can try again.
Replacing the string replace function in the get_the_excerpt function (I commented out the bit of trim_excerpt which gets rid of script etc):
function improved_trim_excerpt($text) { global $post; if ( '' == $text ) { $text = get_the_content(''); /*$text = apply_filters('the_content', $text); $text = str_replace('\]\]\>', ']]>', $text); $text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text); $text = strip_tags($text, '<p>'); */ $excerpt_length = 80; $words = explode(' ', $text, $excerpt_length + 1); if (count($words)> $excerpt_length) { array_pop($words); array_push($words, '[...]'); $text = implode(' ', $words); } } return $text; } remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'improved_trim_excerpt');
I also tried this, which I saw suggested in a few places:
add_filter( 'get_the_excerpt', 'shortcode_unautop'); add_filter( 'get_the_excerpt', 'do_shortcode');
And I tried this, with and without an echo:
do_shortcode(get_the_excerpt());
None of these are working for me. I will either dig out the reason, or create a workaround which fulfils my requirement, and post it back here.
Forum: Fixing WordPress
In reply to: executing shortcodes through get_the_excerpt();Is this in the wrong place on the forum? Should I repost in another section?
Forum: Fixing WordPress
In reply to: executing shortcodes through get_the_excerpt();Any ideas at all?
Forum: Themes and Templates
In reply to: Problems w/ Page Layout Using Thesis Themepost a code or a link and it will be easier for people to help you.
Forum: Themes and Templates
In reply to: How to remove category titleRemove or comment out
echo '<h4>'. single_cat_title( '', false ) . '</h4>'; echo category_description();
(To comment them out, and thereby leave the code in the file in case you need it later, just add
//
before each of those two lines).As alchymyth said- do back up before you make any changes.
And see if that does what you need.
Forum: Plugins
In reply to: Can you stop wp_login_form redirecting to wp-login on fail?Thanks for the replies, people.
The thing I actually *did* was what thecodezombie suggested: rebranding the generic login page. It’s nice to use the WP lost password features, and it’s a pretty form, so hey.
Since then I’ve also learnt that when I said:
Can something on functions.php be made to override or add to existing core functions?
I was probably looking for the WP action hooks and filters. I didn’t use them, however, because it was simpler not too. I’d be curious to know how they might be used to these ends, though…
Forum: Themes and Templates
In reply to: Displaying a news ticker on the front page but not on every pageYou might try Conditional Tags.
<?php if (is_home()) {?> Insert your ticker code... <?php }?>
Does that sound right?
Forum: Plugins
In reply to: [Plugin: WP Survey And Quiz Tool] Additional Text BugI’ve only been changing section.php for styling, and wp-suvery-and-quiz-tool.php, to rename some admin options, certainly nothing which would break a query. I’ll have a go with a clean install and get back to you.
Forum: Plugins
In reply to: [Plugin: WP Survey And Quiz Tool] Additional Text BugNice one Iain- thanks for the support!
Ah- I’ve merged with my other changes and there’s still an issue with the additional text query- it no longer generates new questions, but it still doesn’t save the new values- if you leave the question admin page and then return to it, the original additional text persists.