Remove content links (internal and external), but exclude post at specific categories

To exclude certain categories from the filter function that removes links from the post content, you can modify the function to check the categories of the post before removing the links. Here is an example of how you can modify the function to exclude certain categories: add_filter(‘the_content’, ‘removelink_content’,1); function removelink_content($content=””) { // Get the categories … Read more

Text before price on WooCom

Try this out. Add other conditional tags according to the requirement. Hope it helps. // Add text before price function bd_rrp_price_html( $price, $product ) { if(is_shop()){ $price=”Rent from: ” . $price; } return $price; } add_filter( ‘woocommerce_get_price_html’, ‘bd_rrp_price_html’, 100, 2 );

Animated Accordion [closed]

Since you already loading JQuery, add the following $(‘document’): (function($) { $(window).load(function() { //lets wait for all to be loaded alert(“Accordion script loaded”); var acc = document.getElementsByClassName(“accordion”); var i; for (i = 0; i < acc.length; i++) { acc[i].onclick = function() { this.classList.toggle(“active”); var panel = this.nextElementSibling; if (panel.style.maxHeight){ panel.style.maxHeight = null; } else { … Read more

filter just a portion of plugin function

Looks like that isn’t the filter the want. It runs right at the end of the BBPress bbp_get_breadcrumb function which is after the stuff you want to change. You can change just the separator with bbp_breadcrumb_separator and it looks like before and after can be set with bbp_get_breadcrumb_pre. In fact, it looks like you should … Read more

Show one post per author and order by custom field

You use a AND statement after a GROUP BY statement. That wont work. Try altering the WHERE statement (posts_where_paged filter) to add the AND pm.meta_key = ‘KEY’ line. Additionally you can use the posts_orderby filter to alter the ORDER BY. EDIT You can find some additional information here.

Load script only on selected Pages

You can use conditional tag such as is_page(). Register your script on hook wp_enqueue_scripts and enqueue it in if statement : wp_register_script(‘myashdrop’, get_template_directory_uri() . ‘/js/dropdown.jquery.min.js’, array(‘jquery’)); if (is_page(PAGEID)) { wp_enqueue_script(‘myashdrop’); }