How to call a plugin function in footer.php

After installing the plugin and adding images to a new gallery, paste this code into your footer.php file where you want the gallery to display <?php echo do_shortcode(‘[easy-media med=”231,233″]’); ?> Simply change the gallery i.d’s to your own as the ones in the code above are examples. No Need To Use A Plugin I also … Read more

Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?

Now I’ve understand the question, and yes, it makes sense. The filter additions and the third function do not change at all, what change are the first two functions. There is 2 cases: [AuthorName] part in the url is equivalent sanitize_title($guestauthor) where $guestauthor is what is saved in the ‘guest-author’ custom field [AuthorName] part is … Read more

Display WordPress Search

Tom, You’re right! I didn’t know how templates function, this was not something major, I just wanted to get that value and then display that value on my single.php page – but now I see that’s not how WordPress works. I decided to just leave off that functionality 🙂 Thanks, Josh

Automated mark posts as featured every day

OK, so first of all you’ll need to add your own WP_Schedule event: add_action( ‘wp’, function () { if (! wp_next_scheduled ( ‘mark_posts_as_featured_event’ )) { wp_schedule_event(time(), ‘daily’, ‘mark_posts_as_featured_event’); } } ); function mark_posts_as_featured_event_callback() { // if there are sticky posts in our CPT, unstick them $sticked_post_ids = get_option( ‘sticky_posts’ ); if ( ! empty ) … Read more

Remove tag on my RSS Feed

I believe the most direct way of customizing WordPress feeds is to hook into them directly with the following filter. Edit: as we talked about, let’s just edit the content to tear out any function edit_your_feed_content($content) { $content = preg_replace(“/(<figure.*?[^>]*>)(.*?)(<\/figure>)/i”, “”, $content); return $content; } add_filter(‘the_content’, ‘edit_your_feed_content’);

category not display in word press grammatically

Where are you calling this code? You need to add it to one of the init hooks. If I add that to either a plugin or theme init, then it adds just fine for me, with the $slug typo corrected as Mike pointed out. echo ‘<p>Debug: Loaded functions.php</p>’; function yourtheme_init() { echo ‘<p>Debug: called yourtheme_init</p>’; … Read more