How to exclude the word “class” from being matched in search?

You might try to use the posts_search filter as elegantly suggested by @Kaiser in the first link you provided. Here is one idea: function filter_search($sql){ global $wpdb; if( strpos(get_query_var(“s”),”lass”) !== false AND strpos(get_query_var(“s”),”class”) === false ){ $sql .= ” AND {$wpdb->posts}.post_title NOT LIKE ‘%class%'”; $sql .= ” AND {$wpdb->posts}.post_content NOT LIKE ‘%class%'”; } return $sql; … Read more

Two different pages that share the same content?

Have you take a look at Options Page Add-on for Advanced Custom Field? http://www.advancedcustomfields.com/add-ons/options-page/ I created an option page for my client once where they enter promotion content once in that options page, and display that same information elsewhere via widget, shortcode, and PHP functions. It costs 25AUD but it’s unlimited license and is well … Read more

Hide parts of the post content after typing it’s name or searching it by category

If you want to apply the same logic to the category archives and the search results as in that question you reference, the following should do it. // modified code from http://wordpress.stackexchange.com/a/97589/21376 function hide_on_home_page_wpse_97587($atts,$content) { if (!is_home() && !is_category() && !is_search() ) { return $content; } } add_shortcode(‘nohome’,’hide_on_home_page_wpse_97587′);

Accessing the Posts page Content

So you can fetch the id using a get_option call, then access the data from there. $page_for_posts = get_option( ‘page_for_posts’ ); $page_data = get_page( $page_for_posts ) ; Then you can access the properties like this: <?= get_the_post_thumbnail($page_data->ID) ?> <h1><?= $page_data->post_title ?></h1> <?= $page_data->post_content ?>

add after content don’t work

wb_posts_pagination() seems to be a custom function that sends its output directly to the browser with echo or print. Use a function that returns a string and does not create output to add that string to $content. The printed output doesn’t wait, it goes into the page the moment you call that function.