getting rid of posted on … by"
-
I lost track of an earlier post from yesterday. meanwhile i have found that the information seems to come from Adventure Journal style.css and loop.php where I found entry-date; meta-prep; meta-sp, author-vcard.
Could somebody help me amend the PHP script text, as I have never done it before and am afraid of doing something wrong?
Thank you
-
Then see if that posted on line disappears from your webpage.
You may have to clear your browser’s cache or deactivate any caching plugins.If it doesn’t delete the line you want, try deleting this bit of the code (assuming it’s in the same file);
<?php ctx_aj_posted_on(); ?>
Well, yes that code is in loop.php, but I could not find references to the date (entry-date?) or to “by” (meta-sep?)
<div class=”entry-meta”>
<?php ctx_aj_posted_on(); ?>
</div><!– .entry-meta –><div class=”entry-content”>
<?php if ( post_password_required() ) : ?>
<?php the_content(); ?>
<?php else : ?>In fact, there are two entries:
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
<div class="entry-utility"> <?php ctx_aj_posted_on(); ?> <span class="meta-sep">|</span> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'adventurejournal' ), __( '1 Comment', 'adventurejournal' ), __( '% Comments', 'adventurejournal' ) ); ?></span> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php /* How to display all other posts. */ ?> <?php else : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php $myclasses=join(' ',get_post_class('',$id)); if( preg_match('/sticky/',$myclasses) > 0 ){ echo '<div class="tape tr">?</div><div class="tape bl">?</div>'; } ?> <?php edit_post_link( __( 'Edit', 'adventurejournal' ), '<span class="edit-link">', '</span>' ); ?> <h2 class="entry-title"><a>" title="<?php printf( esc_attr__( 'Permalink to %s', 'adventurejournal' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php if(is_home() && has_post_thumbnail() && $themeOpts['featured-header']!='true' ) the_post_thumbnail(); ?> <div class="entry-meta"> <?php ctx_aj_posted_on(); ?> </div><!-- .entry-meta --> <?php if ( is_archive() || is_search() ) : // Only 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( __( 'Read more <span class="meta-nav">?</span>', 'adventurejournal' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Post pages:', 'adventurejournal' ), 'after' => '</div>' ) ); ?> <div class="clear"></div>
I don’t know if this helps. It is the Original Source which you can see from the actual webpage:
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
<div class="entry-meta"> <span class="meta-prep meta-prep-author">Posted on</span> <a href="https://pintotours.net/2013/03/08/40/" title="16:01" rel="bookmark"><span class="entry-date">08/03/2013</span></a> <span class="meta-sep">by</span> <span class="author vcard"><a href="https://pintotours.net/author/admin/" title="View all posts by admin">admin</a></span> </div><!-- .entry-meta -->
I’m very sorry but every time I look at loop.php I find new entries of the code that you gave me. if you have time please look at the whole loop.php:
Thank you
In the code that I sent you there were eventually theree occasions of <?php ctx_aj_posted_on(); ?>
I deleted all three and hey presto Total Success.
Now I need to remove or use as future links the line at the bottom that has Categories: Uncategorized|Leave a comment
Can you advise please?
thank you
There are 3 mentions of Leave a comment in the loop.php which I sent in the pastebin above. But no references to the other two: categories and Uncategorized.
thank you
What does line 158 do?
Hi Andrew
158:
<?php printf( __( '<span class="%1$s">Categories: </span> %2$s', 'adventurejournal' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
Now I would like to get rid of the rubbish at the bottom but I’m afraid to touch it without help.
Well, I’ve found and apparently solved part of it:
a) I found 3 entries for “Leave a Comment” and just to see if that was what I was lookinbg for renamed it. It worked. maybe I can use that as a button for something else.
b) the first word which was categories, I found print command which I deleted and the word disappeared.c) I am still stuck with “Uncategorized”. I have gone through half the files and so far found an entry in wp-admin/includes/upgrade.php
Could that be it?
Here is part of the code:
if ( !function_exists('wp_install_defaults') ) : /** * {@internal Missing Short Description}} * * {@internal Missing Long Description}} * * @since 2.1.0 * * @param int $user_id User ID. */ function wp_install_defaults($user_id) { global $wpdb, $wp_rewrite, $current_site, $table_prefix; // Default category $cat_name = __('Uncategorized'); /* translators: Default category slug */ $cat_slug = sanitize_title(_x('Uncategorized', 'Default category slug')); if ( global_terms_enabled() ) { $cat_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) ); if ( $cat_id == null ) { $wpdb->insert( $wpdb->sitecategories, array('cat_ID' => 0, 'cat_name' => $cat_name, 'category_nicename' => $cat_slug, 'last_updated' => current_time('mysql', true)) ); $cat_id = $wpdb->insert_id; } update_option('default_category', $cat_id); } else { $cat_id = 1;
I found another entry that looks more promising in wp-includes/template.php
I would be grateful if you could see if I can get rid of this “Uncategorized” at the bottom of the page.
Thank you
/** * Retrieve category list in either HTML list or custom format. * * @since 1.5.1 * * @param string $separator Optional, default is empty string. Separator for between the categories. * @param string $parents Optional. How to display the parents. * @param int $post_id Optional. Post ID to retrieve categories. * @return string */ function get_the_category_list( $separator = '', $parents='', $post_id = false ) { global $wp_rewrite; if ( ! is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) ) return apply_filters( 'the_category', '', $separator, $parents ); $categories = get_the_category( $post_id ); if ( empty( $categories ) ) return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents ); $rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"'; $thelist = ''; if ( '' == $separator ) { $thelist .= '<ul class="post-categories">'; foreach ( $categories as $category ) { $thelist .= "\n\t<li>"; switch ( strtolower( $parents ) ) { case 'multiple': if ( $category->parent ) $thelist .= get_category_parents( $category->parent, true, $separator ); $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a></li>'; break; case 'single': $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>'; if ( $category->parent ) $thelist .= get_category_parents( $category->parent, false, $separator ); $thelist .= $category->name.'</a></li>'; break; case '': default: $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a></li>'; } } $thelist .= '</ul>'; } else { $i = 0; foreach ( $categories as $category ) { if ( 0 < $i ) $thelist .= $separator; switch ( strtolower( $parents ) ) { case 'multiple': if ( $category->parent ) $thelist .= get_category_parents( $category->parent, true, $separator ); $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a>'; break; case 'single': $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>'; if ( $category->parent ) $thelist .= get_category_parents( $category->parent, false, $separator ); $thelist .= "$category->name</a>"; break; case '': default: $thelist .= '<a href="' . esc_url( get_category_link( $category->term_id ) ) . '" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" ' . $rel . '>' . $category->name.'</a>'; } ++$i; } } return apply_filters( 'the_category', $thelist, $separator, $parents ); }
I got some more information:
reference to “Uncategorized” is in 4 files:
wp-admin\edit-tags.php (line 191)
wp-admin\optoons-permalink.php (lines 38, 124)
wp-includes\category-template.php (line 161)
wp-includes\upgrade.php (lines 107, 109)Could you help meremove the display of “Uncategorized” from the bottom of the blog, please?
Thank you
qim
- The topic ‘getting rid of posted on … by"’ is closed to new replies.