Removing any and all inline styles from the_content()

For one of my current projects, I had to transfer blogposts from an old WordPress site to my project. Things went smoothly until I’ve seen that all the posts were copy pasted from Word, leaving this before pretty much every paragraph: <span style=”font-size: medium; font-family: georgia,palatino;”> And at some places things like these: <p style=”text-align: … Read more

Are content.php and content-single.php the same?

I understand that when using get_template_part(‘content’, get_post_format()); it will help choosing a post format for specific page according to post format. And if there is no post format ‘i.e it’s standard’, then it will fallback to content.php But what if I used content-single.php with some logic like this: if (get_post_format() == false) { get_template_part(‘content’, ‘single’); … Read more

why doesn’t the_content() work in this {single-custom_post_type.php} page?

This code is from my page single-publication.php. It outputs the relevant custom fields etc (here wrapped in template tags), but the_content() won’t output the post content. I’ve resorted to using $post->post_content (which works), but the mystery remains: <div class=”publication-info”> <?php printf(“<h2>%s</h2>”, get_the_title() ); ?> <div class=”publication-meta publication-credit”><?php the_publication_credit(); ?></div> <div class=”publication-meta publication-date”><?php the_publication_date(); ?></div><br /> … Read more