double page title [duplicate]

I appreciate your comments, I have looked into a possible repeated question, however I did not find it as helpful as the last comment by @michel after looking into the functions.php file I found this filter add_filter( ‘wp_title’, ‘burger_wp_title’, 10, 2 ); function burger_excerpt_length( $length ) { return 50; } Which I have gotten rid … Read more

Not able to get the exact URL of the file on server located in active wordpress theme

You can’t put a php var, for example $url, in a string in this manner: file_get_contents( “http://example.com/wp-content/themes/themename/download/$url/count.txt” ); You can use get_template_directory_uri to return the url to the current theme directory. For example: $url = get_template_directory_uri() . ‘/download/count.txt’; echo file_get_contents( $url );

Modify comments_popup_link output

You can replace __( ‘No comments’, ‘textdomain’ ) with __( ‘<span>No</span> comments’, ‘textdomain’ ), there is nothing that stops you to do it. In general, HTML inside translatable strings are not recommended but if you really need the span tags, you have not other choice to add them server side. I strongly recommend to think … Read more

Strip HTML tags on custom code from the_content

Following Mark Kaplun advice, I fixed my problem. Just wish there was a way to like a comment. <?php $paragraphAfter = 1; // shows image after paragraph 1 $paragraphsShow = 1; // shows first two paragraphs $content = apply_filters(‘the_content’, get_the_content()); $content = explode(‘</p>’, $content); $max = (count($content) < $paragraphsShow) ? count($content) : $paragraphsShow; for ($i … Read more