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 » Center area post/pages » Comments, trackbacks & pings »

[SOLVED] How to style the comments title


  #1  
Old Jan 14, 2010, 04:56 AM
ahc
 
38 posts · May 2009
[SOLVED] How to style the comments title

How to style the comments title, putting the post's name in italic, for example? I mean: 1 comment to <em>the post title in italic</em> . Thanks
  #2  
Old Jan 27, 2010, 02:04 AM
Zona
 
30 posts · Jan 2010
I'm having the same problem... Under the post (on the post page) I get the line "1 comment to [name of post]" followed by the comment that has been posted. I would like to change the text and formatting of this line.

Where does one do this?

Any advice is appreciated.

Thanks, Zona
  #3  
Old Jan 27, 2010, 06:11 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
edit comments.php and change line 22 (version 3.4.5)
HTML Code:
	echo get_the_title() ?></h3>
to
HTML Code:
	echo '<i>'.get_the_title().'</i>'; ?></h3>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Jan 27, 2010, 03:34 PM
Zona
 
30 posts · Jan 2010
JD: Thanks for the reply. I tried editing comments.php with the text you gave me and I got the following where the phrase "1 comment to [name of post]" appeared:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/thevega4/public_html/wp-content/themes/atahualpa/comments.php on line 24

I'm actually running Atahualpa 3.4.4 and the line you describe as 22 seems to be line 24 in this version given what came up in the error message.

Here is what I see in the preceding lines in my comments.php:

// You can start editing below:
?>

<?php // If there are any comments
if ( have_comments() ) : ?>

<a name="comments"></a><!-- named anchor for skip links -->
<h3 id="comments"><?php // Comment Area Title
comments_number(__('No comments yet to ', 'atahualpa'),
__('1 comment to ', 'atahualpa'), __('% comments to ', 'atahualpa'));
echo get_the_title(); ?></h3>

<?php bfa_next_previous_comments_links('Above'); ?>

I'd like the phrase on my blog to read:
[comment icon] comments (# of comments)

Any other ideas about how to possibly make this change?

Many thanks, Zona
  #5  
Old Jan 28, 2010, 10:42 PM
pakacil
 
20 posts · Jan 2010
I tried to edit comments.php (line 19-22) and make change :

from...
HTML Code:
<h3 id="comments"><?php // Comment Area Title
comments_number(__('No comments yet to ', 'atahualpa'),
__('1 comment to ', 'atahualpa'), __('% comments to ', 'atahualpa'));
echo get_the_title(); ?></h3>
to...
HTML Code:
<h3 id="comments"><?php // Comment Area Title
comments_number(__('No comments yet to ', 'atahualpa'),
__('1 comment to ', 'atahualpa'), __('% comments to ', 'atahualpa'));?>
<em><?php echo get_the_title(); ?></em></h3>
it works like you want: 1 comment to the post title

is it a right php coding technique or not? I don't know but it works

tried with:
• WordPress 2.9.1
• Atahualpa 3.4.5.1
• Local (offline)

Last edited by pakacil; Jan 28, 2010 at 10:46 PM.
  #6  
Old Jan 29, 2010, 07:20 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
pakacil,
HTML Code:
<em><?php echo get_the_title(); ?></em></h3>
will work the same as
HTML Code:
<?php echo '<em>'.get_the_title().'</em>'; ?></h3>
or
HTML Code:
<?php echo '<em>'.get_the_title().'</em></h3>'; ?>
it all has to do with knowing if you are putting the HTML inside or outside the <?php.......?>
If you are inside, use the ECHO and put the HTML in quotes, if you are outside, just put the HTML up.


Zona,
if I understand what you want, change the code to this
HTML Code:
<?php // If there are any comments
if ( have_comments() ) : ?>

<a name="comments"></a><!-- named anchor for skip links -->
<h3 id="comments"><?php // Comment Area Title
comments_number(__('No comments yet to ', 'atahualpa'),
__('comments (1) ', 'atahualpa'), __('comments(%) ', 'atahualpa'));
echo get_the_title(); ?></h3>

<?php bfa_next_previous_comments_links('Above'); ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Own style for link in widget title timdevogel Sidebars & Widgets 10 Jan 5, 2010 04:12 AM
How to style font size in comments? paulae Comments, trackbacks & pings 1 Sep 26, 2009 05:19 PM
Sidebar widgets title style vishvadeep Sidebars & Widgets 1 Aug 18, 2009 05:21 PM
Change Widget title type size/style rickinesc Atahualpa 3 Wordpress theme 3 Jul 24, 2009 01:57 PM
Change Post title type size/style rickinesc Atahualpa 3 Wordpress theme 1 Jul 14, 2009 02:14 PM


All times are GMT -6. The time now is 10:14 PM.


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