Philip
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: upload and the_post_thumbnail( ‘medium’ )thanks for this @goldenapples,
i came here after finding your post in your blog.
i have a question about this,
how you insert the image uploaded in the content of the post as a file?is it possible to return the post id and then update to attach the image(s)?
i will really appreciate any help,
thanks a lot,
PhilipForum: Themes and Templates
In reply to: IF IS post author/editor show content – ELSE hideok, i found what i need/you need to do for this….
first step:
need to get the ID of the user viewing the pagesecond step:
need to check the ID against $post->post_author and echo some contentso how to compile this:
1. before the loop get the ID of the user viewing the page<?php global $current_user; get_currentuserinfo(); ?>
2. inside your loop check the ID against $post->post_author
<?php if ($post->post_author == $current_user->ID) echo 'AUTHOR CONTENT HERE'; ?>
i know a lot of people searching a solution for this, hope you enjoy it…:)
love you WordPress,
all the best!!!Philip
Forum: Fixing WordPress
In reply to: Conditional Tags for Custom Post Typesi run this in my theme’s footer.php,
for example, i do this to get the form scripts:
<?php if ( is_page('contact') ) { ?> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/form.js"></script> <?php } ?>
…if is page “contact” load the /js/form.js script.
what i need is to do the same in a post type (if a user is in a page that belongs to a post type)
thanks a lot for your help @alchymyth!
Forum: Plugins
In reply to: Run a query in a custom widget?thanks a lot MichaelH,
it was a problem with my taxonomies i fix it now.
Forum: Hacks
In reply to: On theme activation check for content and if not available install in databaseIf anyone else want to do something like this,
take a look at wp_insert_category.thanks
Forum: Plugins
In reply to: [Plugin: User photo] front end uploadok, here is a working solution for the Cimy User Extra Fields plugin,
<tr> <th><label for="photo">Photo</label></th> <?php $value = get_cimyFieldValue($user_ID, 'PHOTO'); ?> <td> <img src="<?php echo cimy_uef_sanitize_content($value); ?>" alt="" width="100" /><br/> <input name="cimy_uef_PHOTO_oldfile" value="<?php echo cimy_uef_sanitize_content($value); ?>" type="hidden"/> Update the picture<br/> <input id="photo" name="cimy_uef_PHOTO" value="" type="file"/> <br/>Delete the picture <input name="cimy_uef_PHOTO_del" value="1" type="checkbox"/> </td> </tr>
you can simple included in your form after you have create a new image field in the plugin options.
keep in mind that in the code i use an image field named ‘PHOTO’, but can be used for all the fields/field types you create from the plugin.
hope you find it useful,
thanks to the community!
Forum: Developing with WordPress
In reply to: Vimeo embed in custom field not showing in feedtake a look at Justin’s plugin
https://justintadlock.com/archives/2008/01/27/custom-fields-for-feeds-wordpress-plugin
Forum: Networking WordPress
In reply to: How to get all my multisites to look the same?as Andrea said before, you can define your default theme sitewide,
you can putdefine(‘WP_DEFAULT_THEME’, ‘theme-folder-name’);
in your rootdir/wp-config.phpForum: Networking WordPress
In reply to: Custom Fields for Address/Phone Numberyou can try this,
place this code in your functions.phpfunction add_phone_contactmethod( $contactmethods ) { // Add Phone Number $contactmethods['phone'] = 'Phone'; return $contactmethods; } add_filter('user_contactmethods','add_phone_contactmethod',10,1);
here is the original article
Forum: Plugins
In reply to: A PLUGIN? Author select best comment so that comment be on top of list?yes it would be nice, a plugin with that functionality,
i hope someone with more skills can help here,thanks a lot!
Forum: Plugins
In reply to: [Plugin: User photo] front end uploadi found this article and i have to say that is very useful,
i try to make it work but with no luck till now,can anyone help here on how to, cause the topic here is closed.
thanks a lot
Forum: Plugins
In reply to: how to remove category from the poststhe “wp12” is a category?
if so you can check your permalinks structure or your .htaccess file.
also if you want you can check the WP No Category Base plugin hereForum: Plugins
In reply to: [WPMU Default User Role] [Plugin: WPMU Default User Role] WordPress MU 3Forum: Plugins
In reply to: [WPMU Default User Role] [Plugin: WPMU Default User Role] WordPress MU 3Forum: Hacks
In reply to: On theme activation check for content and if not available install in databasethanks for the reply Rich,
i’ll take a deep look into your solution, to see what i can do,
thanks