Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Edit date in index.php


  #1  
Old Oct 5, 2016, 06:02 AM
_kimberley's Avatar
_kimberley
 
51 posts · Dec 2011
Amsterdam
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
  #2  
Old Oct 5, 2016, 08:45 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
You need to read up on using the_date() function and on formating the date you want
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Oct 6, 2016, 01:21 AM
_kimberley's Avatar
_kimberley
 
51 posts · Dec 2011
Amsterdam
Oke I see it's not the proper way to do it! Every page has that date format

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>'); ?>
  #4  
Old Oct 6, 2016, 05:36 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Oct 9, 2016, 02:09 AM
_kimberley's Avatar
_kimberley
 
51 posts · Dec 2011
Amsterdam
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
  #6  
Old Oct 9, 2016, 10:01 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Donde editar / where edit = index.php, footer.php etc darkleider Montezuma Theme 4 Mar 24, 2013 04:36 AM
[SOLVED] Post Footer - Edit Center Column in Index.php Big Geek Daddy Center area post/pages 2 Aug 17, 2011 04:51 PM
[SOLVED] Date/time problem in Edit POST/PAGE INFO ITEMS nikflorida Post-Kicker, -Byline & -Footer 15 Oct 27, 2010 10:59 AM


All times are GMT -6. The time now is 11:22 AM.


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