Adding Custom JQuery Menu Fresh Slide Out

In addition to @Wyck’s answer, since you asked if you are doing anything wrong, I’d suggest that it is usually more correct to register and enqueue your scripts as you’ve already done with some scripts in my_custom_function, than it is to write scripts directly into the header. That is, put this code: $(function() { $(‘#menu … Read more

WordPress Search on Multiple wp sites

You’ll need to have a look at the posts_clauses filter. There’re more specialised filters as well like posts_where, but you’ll finally end up using the all in one filter. Then you can inspect the outcome using the ‘posts_selection’ hook right below that, or the posts_results filter a bit later on. There’s as well the posts_search … Read more

Function to shorten string without cutting off last word

There are various ways to achieve this as listed following. Using wordwrap() function : function shortened_description($cutlength) { $content = get_field(‘event_short_description’); $charcount = strlen($content); $content = wordwrap($content, 28); $content = explode(“\n”, $content); $shorter = $content[0]; if ($charcount >= $cutlength) { echo $shorter . ‘… <a href=”‘ . get_permalink() . ‘”>more ></a>’; } //$charcount >= $cutlength else … Read more

(Plugin) Icon needed beside the post title [closed]

This can be done easily by using the filter the_title. Below is the custom code which you can use in your theme’s functions.php file. function new_title( $title ) { $new_title=”nic ” . $title; return $new_title; } add_filter( ‘the_title’, ‘new_title’ ); The above will add “nic” prior to post title. Similarly you can use the icon … Read more

Specify Table Column Width on a Page

You could do it like this? <table border=”5″> <tbody> <tr> <td width=”150″ colspan=”2″> <h4>NLP</h4> </td> </tr> <tr> <td width=”50″>Overview</td> <td width=”100″>A natural language processing challenge.</td> </tr> </tbody>

Remove post title in catogory page

In your page template you can use the conditional statement is_category($category) to determine if the header should show: if (!is_category(‘fun’)){ the_title(); } … OR … Better: You can create a category template and not include the_title() in that template file. This is a cleaner way to ensure only that one category page leaves out the … Read more