WordPress.org

Support

Support » Themes and Templates » [Resolved] getting rid of posted on … by"

[Resolved] 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

Viewing 15 replies - 1 through 15 (of 27 total)
  • I found the other post, which said:

    I managed something rather unprofessional, mostly because what I write in the post does not reflect what comes out on the web…

    What I would like to do now 8and it will be all for today…) is to get rid of the

    “”Edit
    Posted on 08/03/2013 by admin “”

    which was ledt behind and is now between the top picture and what I added now.

    How can I get rid of this, please?

    Thanks

    qim

    qim
    Member
    Posted 14 hours ago #

    Hi

    I think I found where I can delete it but do not dare touch the edit without some help.

    Adventure Journal has a single.php with a line

    <div class=”meta”>Posted by <?php the_author_posts_link(); ?> on <?php the_date();?></div>

    what could I do to this line to get rid of the “posted on ” “date”?

    Thank you

    qim

    Just delete the div-line you posted above.

    Thanks

    Should I not back-up the script? I read somwhere about doing a new one in case the software gets updated. can you comment/help?

    You can create a child theme:
    http://codex.wordpress.org/Child_Themes

    and then add you modified single.php there.

    Thanks, I’m going to do that. before I lose you…

    What about style.css and loop.php (see first post above) Should I do something there too?

    Thank you very much

    As far as I can see loop.php doesn’t have “Posted by…”, at least v1.7.2 doesn’t. It uses a custom function ctx_aj_posted_on which you can find in functions.php (line 585).

    Replace the function with for example

    function ctx_aj_posted_on() {
        // add the markup to display the author and the date
    }

    and add modified functions.php to your child theme.

    Ok I’ve done the child theme, but all I get in the folder is style.css.

    How do I delete the div-line in single.php (and maybe in lopp.php)?

    Do I leave style.css alone now?

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    Copy any file you want to edit into your Child Theme directory. You can then edit it there.

    Sorry, our last messages crossed. Meanwhile this is part of what i find in Adventure Journey loop.php:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <?php if ( in_category( _x('gallery', 'gallery category slug', 'adventurejournal') ) ) : ?>
    		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                        <?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>
    
    			<strong><div class="entry-meta">
    				<?php ctx_aj_posted_on(); ?></strong>
    			</div><!-- .entry-meta -->
    
    			<div class="entry-content">
    Moderator Andrew Nevins

    @anevins

    Forum moderator

    BTW you can visit your profile link to see your previous posts.

    Hi
    I tried twice to delete the line but instead is the line below that disappears… Fortunately it is empty anyway.

    I am using the Code Editor. It has a button for “Use Text editor”

    Which should I use, please?

    qim

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    As there are two versions of Adventure theme, may I ask where you got your theme from?

    I downloaded it from within WP. Version 1.7.2

    But now I have another doubt: the line I am trying to delete which is above reads:
    <div class=”meta”>Posted by <?php the_author_posts_link(); ?> on <?php the_date();?></div>

    But what I see on screen and am trying to get rid of, reads:

    posted on (date) by (admin)

    help…

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    Perhaps you’re in the wrong template. In your Child Theme, select all the lines of that file you’re trying to modify and delete them. Delete all contents in the file. Refresh the page and see if it affects your webpage.

    Ohhh, drastic!!!

    Well, I did like you proposed and, yes, the stuff is still there. So, now I guess I should delete the file single.php frpm my child theme, and then what?

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘[Resolved] getting rid of posted on … by"’ is closed to new replies.