Andrei Chira
Forum Replies Created
-
It works.
Thank you, MattyRob.
If anyone else needs it, just copy/paste this code in functions.php:add_filter('s2_email_subject', 'my_filter'); function my_filter($subject) { if ( strstr($subject, "Digest Email") ) { // get the most recent post object $posts = get_posts('numberposts=1'); // access the post data as an array $post = $posts[0]; // access the post title $subject = $post->post_title; } return $subject; }
thanks, I’ll try it out.
In per-post emails the subject of the email sent to subscribers is the title of the post.
That’s what I want in digest emails.
Obviously, digest emails will have more than one post so the subject could be the title of the latest post, for example.
Feedburner works like this with its rss-to-email option.I think that having the title of the post as subject has a lot more chances to get that email open than subjects such as “Latest news from site X” or “Daily Digest E-mail”.
Obviously, “Whatever I want” is static data but I need dynamic data, a piece of code to pull the title of the latest post.
I’m not a programmer so I don’t know what code should I put there.Is it possible to change the subject from “Whatever I want” to the title of the latest post?
SOLVED. It was a theme error, problem only appeared when using a static page as homepage.
Forum: Plugins
In reply to: [Yoast SEO] [Plugin: WordPress SEO by Yoast] Canonical tag is wrongSOLVED. This is a theme specific error.
Deactivating WordPress SEO plugin is the one thing that makes the slider to display so that’s why I assumed it’s a js conflict somewhere.
Replacing the plugin with an older version it’s the second thing that works.
I’ll wait to see what the theme developers have to say and I’ll post the solution here maybe it’ll help someone else.
Thanks again, appreciate your work.I think it’s a js conflict but who knows…
Ok, thanks.
I was posting right now on their support forum anyway.Ok.
WordPress version: 3.3.2 ( later updated to 3.4 but slider still broken)
WordPress SEO version: 1.2.1 ( later updated to 1.2.2 but slider still broken)I did this: updated WordPress SEO to 1.2.1
I expected the plugin to do this: help with seo
Instead it did this: broke the magazine slider on homepage, using theme unspoken v1.0.4 by wpshower.com on https://www.mujo.ro.
It’s probably a js error. I’ve found that on editing posts in admin the tabs in the WPSEO metabox don’t display as they should, they are displayed on top of each other.
What’s curious is that I have 2 sites with almost the same configuration: same WP version, almost same plugins, same theme and one work one doesn’t.
I deactivated the plugins but nothing.You’re right, I just copied & pasted that code from another thread in the forum and didn’t pay attention.
Thanks.Not working. Plugin gives header already sent error and adding it to functions.php crashes the site – blank page.
SOLVED
this works:function s2_subject_changes($subject) { return "This is my preferred email subject"; } add_filter('s2_email_subject', 's2_subject_changes');
and this does not:
add_filter('s2_email_subject', 'my_filter'); function my_filter($subject) { if ( strstr($subject, "Digest Email") { $subject = "Whatever I want"; } return $subject; }