Hot answers tagged

3

It seems that error is in your theme.min.css. The Font Awesome Icon which should appear in the browser is added via CSS using content. But the CSS does not contain the icon information but these weird looking characters. For Example: .fa-music:before{content:"�"} I cannot tell why ...


1

Based on your comment clarifying what you want to achieve, it appears you want to display the first 60 characters of your post not including any shortcodes. To do this you can use the strip_shortcodes() function. Rewritten with that, your code will look like this: $content = strip_shortcodes(get_the_content()); $content = apply_filters('the_content', ...


1

WordPress provides a few generated classes just for this issue. What you probably want is to float the image left in your example. The CSS rules listed in the Generated Classes section of this Codex page are what you are after. https://codex.wordpress.org/CSS#WordPress_Generated_Classes For the sake of future-proofing or a URL change, here is that ...


1

Yes you can do it, just find the file where the text resides, maybe single.php or single-{post_type}.php or archive-{post_type}.php Then, look for the string you want to change erase it and set a variable, something like this: If the file where the string is, is a template file for that specific post type, the you will only replace the string for whatever ...


1

Your headings (h1, h2, etc) have the css property word-break: break-all; applied to them. Removing this property in Firebug provides the correct line breaks. You could override this in your child theme CSS.


1

The best ways to get content OUTSIDE of WordPress would be (listed in my order of preference): By using the WP REST API plugin (soon to be fully integrated into core) Via RSS feed as mentioned by @AricWatson in the comments above. Direct queries into the MySQL wp_posts and wp_postmeta tables. When content is rendered INSIDE of WordPress there are a ...


1

The method I prefer to use is just a bit shorter then the previous answer. <php $myExcerpt = wp_trim_words( get_the_content(), 20, '' ) ; echo $myExcerpt ; ?> The WordPress function wp_trim_words() returns only text (no images). wp_trim_words ( string $text, int $num_words = 55, string $more = null )



Only top voted, non community-wiki answers of a minimum length are eligible