boutros
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Remove Content within the Header tags in the ExcerptThanks alchymyth for your input.
Your code works. I’ll work on it, test it and refine it some more.
I knew I had to add the other pieces (length, more, etc.) to the code to make it to work.
It would be nice if the top code (the simpler one) works without adding all the extra baggage.
I appreciate all your help.Forum: Fixing WordPress
In reply to: Remove Content within the Header tags in the ExcerptThanks alchymyth.
I got your point with priority, but even when I use instead of the above line of code:add_filter( 'get_the_excerpt', 'wp_strip_header_tags', 1);
I still get the same results. It did not make any difference. What priority should I be using?
Forum: Fixing WordPress
In reply to: Remove Content within the Header tags in the ExcerptCorrection to the above code:
Instead of str_replace(), I meant to use preg_replace().
But still the result is the same.Forum: Fixing WordPress
In reply to: Remove Content within the Header tags in the ExcerptFor the above question, here is the code so far:
<?php function wp_strip_header_tags( $excerpt ) { $regex = '#(<h([1-6])[^>]*>)\s?(.*)?\s?(<\/h\2>)#'; return str_replace($regex,'', $excerpt); } add_filter( 'the_excerpt', 'wp_strip_header_tags'); ?>
The problem here is that the $regex does its job, it returns an empty string for the header tag and its content when tested here: https://www.solmetra.com/scripts/regex/
But, when I add the above code to my WordPress theme. The function does not work, meaning the header’s un-formatted content still displays
in the excerpt. It is like this function is not hooked properly or is being disregarded.
I tried the parameter ‘get_the_excerpt’ instead of ‘the_excerpt’ in the add_filter() function, with no difference to the output.
Any ideas? Thanks.Forum: Everything else WordPress
In reply to: Pingbacks from ForumsOk.
2 more questions:1. Does the other Blog have to be a WordPress Blog?
2. Do you also get pingbacks from the Comments textarea or just from posts or pages?Thanks.
Forum: Everything else WordPress
In reply to: Pingbacks from ForumsThanks esmi, that makes sense.
Is there any way you can be notified from forums? any technology similar to pingbacks specific to forums?Forum: Fixing WordPress
In reply to: unwanted paragraph tags in the excerpt@placutus: I am glad you decided to upgrade WP version.
Don’t forget to backup first. Also any plugins that are not compatible
get rid of them (delete them and not only deactivate). Old, not updated plugins pose a security risk and should be removed.
For a complete Backup of WordPress see my tutorial: https://bacsoftwareconsulting.com/blog/index.php/wordpress-cat/complete-backup-of-your-wordpress-website/Why too many plugins are Not advisable, see: https://bacsoftwareconsulting.com/blog/index.php/wordpress-cat/plugins-in-your-wp-theme/
@wpismypuppet: Thanks for suggesting my tutorials, I did not even test the code for WP 3.6.5 and probably not even 3.8.5.
Boutros.
Yes when I hit the ‘Update Profile” button the forward slash disappears.
There is no save button.@rev. Voodoo: Thanks for you responses. I actually solved the issue and I will detailed for others to learn:
From my WordPress Experience, I had a hunch that it had to do with “kses.php” file in “wp-includes” folder. So once I upgraded to 3.3.1 for some reason this file somehow got corrupted. So I got a fresh “kses.php” from www.ads-software.com (the 2 files were different in size, that’s how I knew that something is not right there) and replaced the existing one.
Once I did that, everything is good to go. The forward slash in the closing ‘a’ tag is not being removed.
boutros.Deactivating all plugins did not work. Still the same problem as described above. Very weird!
Forum: Hacks
In reply to: Remove WordPress Version does Not work anymore in WP 3.1.2 and WP 3.1.3I was wrong about my previous post. Thanks to the caching screw up of W3 Total cache on IIS servers.
Forum: Hacks
In reply to: Remove WordPress Version does Not work anymore in WP 3.1.2 and WP 3.1.3It seems (but I could not find it documented anywhere) starting with Version 3.1, WordPress no longer add the version number by default when wp_head()is fired.
add_action('wp_head', 'wp_generator');
is not being added by default.Forum: Hacks
In reply to: Remove WordPress Version does Not work anymore in WP 3.1.2 and WP 3.1.3Any help? Anybody having this issue?
Thanks.Forum: Hacks
In reply to: Number of posts attached to each tagThanks alchymyth.
Forum: Plugins
In reply to: php flush() and cache pluginsThis is from W3 Total cache FAQ:
I see garbage characters instead of the normal web site, what’s going on here?
If a theme or its files use the call php_flush() or function flush() that will interfere with the plugin normal operation; making the plugin send cached files before essential operations have finished. The flush() call is no longer necessary and should be removed.*So eventhough things were working fine on my blog, it might not work for others. I am not sure about other caching plugins.
Boutros.
Forum: Plugins
In reply to: php flush() and cache pluginsNo there is no conflict (to the best of my knowledge).
I use W3 Total cache plugin with the php flush() function for my blog. It actually helps in immediately rendering the ready parts of the page rather than waiting for the whole page to load (this gives the impression of a faster download). The flush code should go immediately after the </head>:
<?php flush(); ?>Why don’t you try it and see if you get any issues.
Hope this helps,
Boutros.