Articles of functions

Get the 5 lastest Featured Posts from a category

Here is the website http://ariadneswonderland.gr/ that all this concerns. On the homepage I’m using a Drop shadow box plugin under the gallery to show a series of images of featured posts, as of right now, as i’m still building the website all you see is the White box under the gallery and a emoticon inside […]

2 Loops, Only Displaying 1 Loop in Both Loops

I have 2 loops, movie trailers and gaming trailers but gaming trailers is displaying under both Movie Trailers and Gaming Trailer. Each loop displays the post tagged with either Movie Trailer or Gaming Trailer. How do I get posts tagged with “Movie Trailers” under the movies area and posts tagged with “Gaming Trailers” under the […]

If in category to be inside of a function

I have this code in WordPress index.php and I was wondering how can I transfer this in to a functions.php to be a part of a function? <?php if (in_category(‘featured’)) : ?> <a href=”<?php the_permalink(); ?>”> <span class=”featured_icon”> <img src=”<?php bloginfo(‘template_directory’); ?>/images/featured_icon.png” /> </span></a> <?php endif; ?> Thank You in advance for Your help 🙂

How to select a page within admin?

How does one apply an action to one particular page within admin? I’ve added a bunch of wysiwyg editors to one page (“Home”) and now I don’t need the main editor. But the function below – of course – removes the editor from all pages: function remove_editor_from_home_page() { remove_post_type_support( ‘page’, ‘editor’ ); } add_action( ‘init’, […]

is_plugin_active() not properly returning true

I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned – does anyone have any idea why and how to rectify it? EDIT: some basic code. I am in the admin area, and I’m trying to […]

Custom Taxonomy Tag Search

I have an existing WordPress search function, what I’d like to be able to do is extend the search to the tags from my custom taxonomy…how do I do that? <form method=”get” id=”searchform” action=”<?php echo home_url(); ?>”> <input type=”text” value=”Product Search…” name=”s” id=”s” /> <input type=”image” src=”<?php bloginfo(‘template_directory’) ?>/images/icosearch.png” id=”searchsubmit” value=”” /> </form> I tried […]

RSS Feed has no styles in chrome – function to add one?

This is a really bizarre problem. For some reason Chrome does not have any RSS feed formatting? Where as most other browsers do! So it seems from I read online that I have to create my own style sheet for it :/ That’s fine, but how can I add my RSS stylesheet to my wordpress […]

Check if term is in a taxonomy?

Is there a function that does something like: is_in_taxonomy($term, $taxonomy) Where it returns true if $taxonomy has that $term. ???? Thanks!

Only show category to certain user levels without plugin

I’m building a site for some army guys to share photos, and one thing keeps stumping me. They have some photos that they’d like everyone who is signed up for the site to view, and others that just they can view. But they can’t be administrators. The only help I can find is on only […]

Avoiding Duplicate function names in Post Loop (WP_Footer script)

Say I created a plugin that injects content (used as a shortcode) into a post. I’m trying to push that code for each post to the bottom of the page. This works fine, however when you are on an archive page with multiple posts using the same shortcode, there is an obvious conflict because the […]