security_man
Forum Replies Created
-
Forum: Hacks
In reply to: Get last date when any item in a custom taxonomy was updatedthe_date($post->ID)should work as long as it is out of the loop. when a category page is called the post data is there for the most recent post (if i remember right)Forum: Hacks
In reply to: Hack to change text after page creation but before presenting to the browser?put it in the functions.php file of the template
Forum: Hacks
In reply to: Add $_GET data to the end of all generated linksi am surprised that no one has run into this before – especially with the new iframes on facebook… or am i being too clever and outsmarting myself?
opinions are good if you dont have answers 😀
Forum: Hacks
In reply to: Hack to change text after page creation but before presenting to the browser?try this:
your_function($replacement_text, $content) { global $post; //do whatever str replace magic you need here } add_filter('the_content','your_function');Forum: Hacks
In reply to: Get and resize Thumbnails with images taken from custom fieldscheck out the link below, it has what you are looking for and specifically wp_insert_attachment() is the function you need.
Forum: Hacks
In reply to: Making a pricing grid plugin, so tables or divs?tables… to keep my sanity LOL
Forum: Hacks
In reply to: One random post from 16 specific posts, but everything else unaffectedtwo loops. one with a regular query with a limit of 7 and above that the loop you posted earlier looks like it would do what you want.
Forum: Hacks
In reply to: modifying the title and description in a plugini assume you are talking about changing the meta tags depending on the project, correct?
if not then nevermind the rest of this 🙂
there isnt a wordpress function per-se, if you look at the header.php template you will see how the title tag is being generated now. usually a series of if statements to build whatever is finally echoed. Just add the code you want into that and i think thats what you are asking for
Forum: Hacks
In reply to: Get and resize Thumbnails with images taken from custom fieldsare you uploading the image to your wordpress install?
Forum: Hacks
In reply to: Get and resize Thumbnails with images taken from custom fieldsi would just upload it and then paste the url of the thumbnail into the custom field…
Forum: Hacks
In reply to: Loop for custom taxonomyhell, try this and see if it works:
$myposts = get_posts('post_type=portfolio&'.$term->taxonomy.'='.$term->slug); foreach($myposts as $post) : setup_postdata($post); do your loop stuff here endforeach;Forum: Hacks
In reply to: Loop for custom taxonomylooking at your code again, can you give me a print_r of the $term object? maybe that will help.
Forum: Hacks
In reply to: Loop for custom taxonomynot really sure… i mean if it is pulling the custom post type but not filtering by the custom taxonomy then the only thing i can think it would be is the taxonomy portion of the query.
When you say it breaks the page, how is it broken? do you get an error and if so what is it?
I take it you didnt create the custom post type or the custom taxonomy, correct? the reason i ask is that the genre instead of genres suggestion was not a specific suggestion but rather so you would check the details of when the custom post type/taxonomy were created to make sure those calls are correct.
if you want to find that, the function you are looking for is register_post_type… it will usually be called within another function that is used in an add_action to the init. there is an array that has to be passed into register_post_type which has things like the name, singular_name and other parameters that it needs. those labels have to match when you are making queries.
I hope that makes sense because unless i am missing something there really isnt any other thing that could be the problem.
Forum: Hacks
In reply to: How To Make A PHP Include Function Within A Postplugin is the way i have done that in the past… unless you can hard code it into the template then thats the way to do it imho
Forum: Hacks
In reply to: Loop for custom taxonomythat should work… if it is not then odds are you dont have the custom taxonomy correct. maybe genre instead of genres or atomic-war instead of atomic-war-1 ? Not sure on specifics but i will be willing to bet dollars to donuts that that is where the issue is because wordpress is just ignoring the genres parameter so it doesnt understand it somehow.