• Hello.
    I am using mailchimp to send rss feed updates.
    everthing looks fantastic except that the text alignment of the content of the post is aligned left and I want it to be aligned right. when I add these merge tags the text is aligned left: *|RSSITEM:CONTENT_FULL|* and *|RSSITEM:CONTENT|*
    I know this question is more related to my hosting, but I would like to know if any of you have any idea.
    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • It is not related to your hosting, but it does sound like you are using a plugin or something to connect your feed to mailchimp. (WP generates the feed.) There isn’t anything in WordPress core to affect the look of the feed, but plugins can.
    It sounds like you are describing the email though, since every feed reader will render the feed its own way. Both the email and the feed reader are outside the scope of WordPress, so you are in the wrong place.
    If you have a plugin for this, ask at the plugin’s support forum. Otherwise, ask at Mailchimp.

    Thread Starter Daniel

    (@davil2008)

    Hello, and thank you for your response.
    1. I’m currently not using any plugin to connect my feed to mailchimp. When I created the campaign, I just entered my feed url…
    2. Hi, I already contacted mailchimp, and they told me to contact my hosting ?

    Moderator bcworkz

    (@bcworkz)

    Mailchimp’s response makes no sense. Neither your host or WP feeds determine text justification. A RSS feed is just a raw HTML data stream, no styling or text justification data is included. That sort of thing is normally applied by your feed reader, or in this case, Mailchimp’s feed parser. In the case of plain text email, there’s nothing anyone can do, it’s up to the mail client how content is presented. Plain text email is pretty rare these days, Mailchimp will first try to send HTML email before falling back to plain text. It would be CSS or element styling that’s added as part of the email message that would determine text justification. This has to be added by Mailchimp as part of their process.

    While you can right justify content created within Mailchimp, I suspect there’s not a way to do so for email created from RSS feeds (unless the feed is in a RTL language). I cannot point to any authority on this, it’s just a hunch on my part.

    Thread Starter Daniel

    (@davil2008)

    1. So if the feed isn’t generating any style how can this be ? For all other elements such as date and author, I can just align them as I wish in the campaign builder, and they show up in the email the same way, only that if I try this on the content of the post, it shows aligned left no matter what.
    2. What do you mean by “content created with in mailchimp” ?
    3. But as I mentioned above, it is possible to align rss feed content in the campain builder, only that there’s something unique about the content of the post.
    And just for the interest, the feed isn’t generated by wordpress ? If so, aren’t all wordpress sites feeds generated the same ? ( in the same language etc. ? )

    WordPress generates a feed, in the language of the site. It uses the content from the database, with existing markup, but that does not include CSS unless it is inline. Plugins can modify the feed as it is being generated. Feeds don’t have any styling. Only the programs that show the feed apply styling to it.

    You say you are not using the WP feed, so whatever you are using to generate the feed is in charge of the content and markup.
    Whatever “campaign builder” you are using is not part of WordPress, so your questions should be addressed to that support forum.

    Thread Starter Daniel

    (@davil2008)

    But I am using the wordpress feed: justcook.co.il/feed

    Moderator bcworkz

    (@bcworkz)

    I’m a bit slow, apologies. I just realized your TLD is .il and the language is Hebrew. The issue isn’t text justification or alignment exactly. It’s that text direction should be RTL where right justification is the default. The feed properly declares the locale language as “he-IL”. That alone should cause Mailchimp to present text in a RTL direction.

    The issue is there’s nothing wrong with the WP feed, Mailchimp isn’t processing it correctly.

    Thread Starter Daniel

    (@davil2008)

    So do you have an idea of how to fix this ?

    Moderator bcworkz

    (@bcworkz)

    The trouble is I don’t see anything wrong with the feed. There’s nothing to fix AFAIK on the WP end. Something to try anyway would be to have WP send a Content-Language: he response header. It’s redundant since it’s specified within the feed. We’d use the “wp_headers” filter to have WP send extra response headers.

    The real solution is Mailchimp should be including the dir="rtl" attribute in the email message’s <html> tag.

    A crude work around would be to use “the_content_feed” filter to insert a CSS styling rule at the start of content output. CSS similar to <style>* {direction: rtl;}</style>. There is a chance of such a rule being stripped out by Mailchimp, but worth a try if nothing else is working.

    Thread Starter Daniel

    (@davil2008)

    OK, I will search a way to add custom css in mailchimp to add this.
    Anyway, thank you for youd in-depth response.

    Thread Starter Daniel

    (@davil2008)

    Well, I found a code block that I tried to add and something happened:
    1. I tried adding <html dir="rtl" lang="en-US"> which didn’t do anything ( probably because it isn’t in the real <html> tag )
    2. but when I tried adding <style>* {direction: rtl;}</style> the text actually turned around, I took two screenshots, of the campaign, one with out the code and one with the code.
    without code: https://ibb.co/0cTfH1H
    with code: https://ibb.co/zmjKWZq
    Unfortunately, when I send a test email, the text alignment is still left…

    Thread Starter Daniel

    (@davil2008)

    I now contacted mailchimp and asked them if it’s possible to edit the html directly.

    Thread Starter Daniel

    (@davil2008)

    well there is a way to view and edit the code of the block, but not the <html> tags.
    in the *|RSSITEM:CONTENT_FULL|* block the code looks like this:

    <div style="text-align: right;">
    <span style="font-size:20px"><code>*|RSSITEM:CONTENT_FULL|* </code></span>

    I tried replacing <div style="text-align: right;"> in <style>* {direction: rtl;}</style> which didn’t help.

    any ideas that will work for this format ?

    Moderator bcworkz

    (@bcworkz)

    Did you try <div style="direction: rtl;"> instead? I think Mailchimp may strip out actual <style> blocks because they are not honored by some mail clients. Element style attributes should be OK.

    Thread Starter Daniel

    (@davil2008)

    No, this didn’t help either.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘change text alignment in rss feed’ is closed to new replies.