Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Edit date in index.php (http://forum.bytesforall.com/showthread.php?t=23567)

_kimberley Oct 5, 2016 06:02 AM

Edit date in index.php
 
Oke I got a atahualpa-child theme with index.php and I would like to echo date like you can see here

Code:

<?php bfa_post_headline('<div class="post-headline"><div class="date">29&nbsp;<span>okt</span></div>','</div>'); ?>
But how to echo just date number and most important, the month in 3 characters.
10 OKT, 9 DEC, etc, etc.

CSS and HTML is done, only I need to know how to echo these dates. I think something like this?
Code:

<?php bfa_post_headline('<div class="post-headline"><div class="date">'. the_date(d) .'<span>'. the_date(m) .'</span></div>','</div>'); ?>
But that doen's work :(

juggledad Oct 5, 2016 08:45 AM

You need to read up on using the_date() function and on formating the date you want

_kimberley Oct 6, 2016 01:21 AM

Oke I see it's not the proper way to do it! Every page has that date format :p

But how en where to add thumbnail? I got this code
Code:

echo get_the_post_thumbnail(null,array( 312, 312));
and would like to place it before the text begins in:
Code:

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>

juggledad Oct 6, 2016 05:36 AM

BTW - (I should have remembered this before) if you go to ATO->Edit POST/PAGE INFO ITEMS you can find how to use the %date function in the theme options in the post KICKER, BYLINE or FOOTER

Atahualpa will display each post's featured image (or thumbnail as it used to be called) automatically when you are displaying excerpts. This allows you to have an featured image in an excerpt and if you put another image in teh post, that immage will show in the full post and the featured image will not. If you want the same image, you just add the image to the begining of the post.

So why are you trying to add them in?

_kimberley Oct 9, 2016 02:09 AM

I alway using featured image and I would like to see it on home and inside the post without doing extra actions like posting it as a image to see in full post. Most of the authors are layzie :p

juggledad Oct 9, 2016 10:01 AM

well if you want to have a customization, here is what you could do
Edit bra_post_parts.php (it is in the atahualpa/functions folder) and change lines145-148 which are
HTML Code:

        if ($do_full_post == 1) {
                $bfa_ata_more_tag_final = str_replace("%post-title%", the_title('', '', false), $bfa_ata['more_tag']);
                the_content($bfa_ata_more_tag_final);
        } else {

to
HTML Code:

        if ($do_full_post == 1) {
                $bfa_ata_more_tag_final = str_replace("%post-title%", the_title('', '', false), $bfa_ata['more_tag']);
                the_content($bfa_ata_more_tag_final);
                if(has_post_thumbnail()): ?>
                <a href="<?php the_permalink() ?>"> <?php the_post_thumbnail(); ?></a>
                                <?php endif;
        } else {

and that should put the featured image as the first thing in each full post - if it exists

Remember to document what you are doing so you can reapply the patch in the future if you need to.


All times are GMT -6. The time now is 06:32 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.