check if FILTER(“the_content”) is being executed in `the_post()`

I want to use add_filter(‘the_content’,………..) however, I want that filter only to affect main post’s content. See phseudo-example: <html> ……. <meta decsription>…..the_content…</meta> ……. <left_widget>….the_content…</left_widget> ……. <MAIN_POST>….the_content…</MAIN_POST> <—————– I want only this to be affected …… How to achieve? (of course, out-of-question is the category pages, where post_contents are listed) 5 Answers 5 Found solution here, … Read more

wp_title() empty on a static front page

I’m trying to use wp_title() to create a heading for my pages, but I’m using a static front page and, while all of the other pages render the title properly, the front page won’t. This is what I’m working with: <div id=”main-content”> <h1><?php wp_title(“”, true); ?></h1> <?php while( have_posts() ) : the_post() ?> <div class=”pagecontent”> … Read more

Allow EPS file upload – two EPS files have different MIME types

I got this error message when trying to upload EPS-files to my WordPress Media Library: Sorry, this file type is not permitted for security reasons So I added this snippet to my functions.php add_filter( ‘upload_mimes’, function ( $mime_types ) { $mime_types[ ‘eps’ ] = ‘application/postscript’; return $mime_types; } ); After that I can upload several … Read more

How to make a button?

There is plenty of information on how to make the Read More function display different text in the Codex but what kind of filter would need to be used to make it display <button class=”readmorebtn” onclick(permalink)>Read More</button>? 2 Answers 2 The “(more…)” link gets filtered through the_content_more_link in get_the_content(). You can hook into this function … Read more

Where is this inline CSS code [closed]

Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers’ support routes. Closed 3 … Read more