Reuben
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: A WordPress "news feed"oops..something wrong the code I posted
change this lineadd_action('created_term', 'post_tax_to_feed', 3);
to
add_action('created_term', 'post_tax_to_feed', 10, 3);
Also, you can use this action too ‘created_company’. In this case no need to check for $tax == and no need of those 2 extra arguments in add_action.
wp_nav_menu fall backs to wp_page_menu if there is no custom_menu. Change the wp_page_menu args using wp_page_menu_args filter.
Change code in funtions.php in twentyten folder
function twentyten_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' );
to
function twentyten_page_menu_args( $args ) { $args['show_home'] = true; $args['exclude'] = '17,38'; return $args; } add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' );
Forum: Fixing WordPress
In reply to: Protect Admin Name in CommentsUse an array of names and check using in_array function.
Forum: Fixing WordPress
In reply to: Protect Admin Name in Commentsfunctions.php in your theme folder and also some correction to the code above
add_filter('pre_comment_author_name', 'protect_my_name'); function protect_my_name( $name ){ if( strtolower($name) == 'my name' && !is_user_logged_in() ){ wp_die(__('Booo, my name is not allowed')); } return $name; }
Forum: Fixing WordPress
In reply to: Protect Admin Name in Commentsafaik there is no predefined function which does that but you can use function like this
add_filter('pre_comment_author_name', 'protect_my_name'); function protect_my_name( $name ){ if( strolower($name) == 'my name' && !is_user_logged_in() ){ wp_die(__('Booo, my name is not allowed')); } return $name; }
Also, remember ‘my name’ after the ‘==’ should be in lower case and replace it with your name.
Forum: Fixing WordPress
In reply to: Dynamically loaded content via AJAX breaks loading jQuery objects.Maybe this can help
https://www.wphardcore.com/2010/5-tips-for-using-ajax-in-wordpress/Forum: Fixing WordPress
In reply to: A WordPress "news feed"Yes it is possible. You can use this action
created_term
or ‘created_category'( assuming the taxonomy is category )heres a bit of code to get you started
add_action('created_term', 'post_tax_to_feed', 3); function post_tax_to_feed( $term_id, $tt_id, $tax ){ if( $tax == 'company' ){ //its our custom taxonomy, insert the post here using wp_insert_post } }
for inserting post function, see this page https://codex.www.ads-software.com/Function_Reference/wp_insert_post
Forum: Fixing WordPress
In reply to: Dynamically loaded content via AJAX breaks loading jQuery objects.I don’t get it. What are you trying to achieve?
Forum: Fixing WordPress
In reply to: How to include Custom Post types in Archivesis there a way to include Custom Post Types in the archives without adding a custom loop to select all posts AND all custom types too?
You can use query_posts to achieve this.
And yes, your understanding is correct.
Forum: Fixing WordPress
In reply to: Dynamically loaded content via AJAX breaks loading jQuery objects..load(loadUrl + ” #content”);
Only that part of the page is loaded and nothing else. If you want to load scripts using ajax then you can use jQuery.getScript function.
Forum: Fixing WordPress
In reply to: Prevent photos showing on google?Forum: Fixing WordPress
In reply to: Posting panels missingOn the top right of the edit posts page you can see “screen options” button, click on it and check these “Excerpt, Send Trackbacks, Custom Fields, Discussion and Author” checkboxes.
Forum: Fixing WordPress
In reply to: How to have "sticky" pages on sidebar and top navigationThey would like to have some pages listed on the top nav (header) and some in the sidebar (left).
You can use WordPress 3.0 custom menus to achieve that.
Forum: Fixing WordPress
In reply to: Category will not show full posts only excerptsopen loop.php and at about line 104 replace these lines
<?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> </div><!-- .entry-content --> <?php endif; ?>
with
<div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> </div><!-- .entry-content -->
Forum: Fixing WordPress
In reply to: How do I remove the gravatars on my comments?Go to Settings->Discussion, scroll down and select Don’t show Avatars