SitePoint Sponsor

User Tag List

Page 4 of 4 FirstFirst 1234
Results 76 to 98 of 98
  1. #76
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ronpat View Post
    Back to line 25 again....
    Code:
    <span class="postmeta"><?php printf(__('Published %1$s | Categorized as <a class="page" href="%3$s  | '
    Should I look for the above code in template files...?

  2. #77
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    I'm hoping the code examples I posted previous to this post will work for you.

    In regards to the broken comments link, the mark-up
    HTML Code:
    			<!-- If comments are open, but there are no comments. -->
    
    <p><a class="page postmeta" href="<a href="http://prygara.com/blog/2013/08/03/fireworks-test-post-2-2/#respond" title="Comment on Fireworks test post # 2">Comments</a></a></p>
    
    <div id="respond">
    seems to be coming from the comments.php file
    PHP Code:
            <!-- If comments are open, but there are no comments. -->

         <?php else : // comments are closed ?>
            <!-- If comments are closed. -->
            <p class="nocomments">Comments are closed.</p>

        <?php endif; ?>
    <?php 
    endif; ?>


    <?php if ( comments_open() ) : ?>

    <div id="respond">
    but I can't see where the link would be coming from.

    *Because this thread has gotten away from CSS I'm moving it to the CMS & WordPress forum

  3. #78
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks Mittineague. I will try to change the code according to your examples. Will get back on this.

  4. #79
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    ......
    I may have over-simplified, if that misses the RSS link's class of "page", try
    Code PHP:
            <span class="postmeta">
    		<?php printf(__('Published %1$s | ', 'kubrick'), get_the_time('F, Y'));
    		_e('Categorized as ', 'kubrick');
    		_e(the_category(', '), 'kubrick'); ?> | <?php
    		printf(__("<a class='page' href='%s'>RSS 2.0</a> feed","kubrick"), get_post_comments_feed_link()); ?>
    		</span>

    I'll take a look at the comments file ASAP
    Hi Mittineague,

    I changed the file as you suggested. It's working. Thanks.

    I was wondering if there's a way to apply the same class='page' applied to RSS feed, to "Categorized as class='page' (name of category)"...

  5. #80
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post

    In regards to the broken comments link, the mark-up seems to be coming from the comments.php file

    ..........but I can't see where the link would be coming from.

    *Because this thread has gotten away from CSS I'm moving it to the CMS & WordPress forum

    Did you want me to post comments.php content ?

  6. #81
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    If WordPress has a function that returns Category URLs and Name (not certain but I think it does) then that.could be used instead of the function that returns the link(s) and the class=page could be hardcoded in.

    Did you want me to post comments.php content ?
    Yes please, the part between the
    <!-- If comments are open, but there are no comments. -->
    and
    <div id="respond">

  7. #82
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here you go:


    Code:
    <?php if ( comments_open() ) : ?>
    		<!-- If comments are open, but there are no comments. -->
    
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    		<p class="nocomments"><?php _e('Comments are closed.', 'kubrick'); ?></p>
    
    	<?php endif; ?>
    <?php endif; ?>
    
    
    <?php if ( comments_open() ) : ?>
    
    
    <p><a class="page postmeta" href="<?php comments_popup_link('Comments', '1 Comment', '% Comments and counting'); ?></a></p>
    
    
    
    <div id="respond">

  8. #83
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    I'm not sure it will work as the codex says
    This tag must be within The Loop or a comment loop.
    I think it is in a comment loop, you can change to this to find out
    Code PHP:
    <p><?php comments_popup_link( 'Comments', '1 Comment', '% Comments and counting', 'page postmeta' ); ?></p>

  9. #84
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I tried. It's not working. I think I might wanna try to re-build the blog page from scratch in the future (it's not a priority for now) since it's hard to figure out what was messed up in HTML/PHP. I will need to browse for some tutorials online.

    Thanks for your help,Mittineague.

  10. #85
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    I guess it depends on what you mean by :not working. The mark-up is good now.
    HTML Code:
    			<!-- If comments are open, but there are no comments. -->
    <p><a href="http://prygara.com/blog/2013/08/03/fireworks-test-post-2-2/#respond" class="page postmeta"  title="Comment on Fireworks test post # 2">Comments</a></p>
    <div id="respond">
    <h2>Leave a Reply</h2>
    When you click on "Comments" the page scrolls so the #respond div is at the top.
    *you may need to add a few test comments to see the effect

    If this is not what you wanted, what?
    Maybe there is a different function you're looking for that will do whatever that is.

  11. #86
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Oh I am sorry...what I meant by not working is e.g. when I am on HTML/CSS category page: HTML/CSS test post # 1 and HTML/CSS test post # 2 with Posted in No Comments and Posted in 1 Comment links, when I click on those links they give me Error 404 - Not Found.

  12. #87
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    I think that's a different file involved, but with a similar problem
    HTML Code:
    <p>
    	<span class="postmeta">Posted in <a class="page" href= | 
    		   <a class="page" href="<a href="http://prygara.com/blog/2013/08/03/htmlcss-test-post-2/#respond" title="Comment on HTML/CSS test post # 2">No Comments </a>
    	</span>
    </p>
    Can you check this part of your archive.php file?
    PHP Code:
    <div <?php post_class() ?>>
        <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
        <small><?php the_time('l, F jS, Y'?></small>

        <div class="entry">
            <?php the_content() ?>
        </div>

        <p class="postmetadata"><?php the_tags('Tags: '', ''<br />'); ?> Posted in <?php the_category(', '?> | <?php edit_post_link('Edit'''' | '); ?>  <?php comments_popup_link('No Comments ''1 Comment ''% Comments '); ?></p>

    </div>

  13. #88
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is what I have in my archive.php while loop:

    Code:
    <?php while (have_posts()) : the_post(); ?>
    		<div <?php post_class(); ?>>
    				<h2 id="post-<?php the_ID(); ?>"><a class="page" href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h2>
    				<p class="date"><?php the_time(__('F j, Y', 'kubrick')) ?></p>
    
    				<div class="entry">
    					<?php the_excerpt() ?>
    				</div>
    
    				<p>
    				   <?php the_tags(__('Tags:', 'kubrick'), ', ', '<br />'); ?> 
    					<span class="postmeta"><?php printf(__('Posted in <a class="page" href=', 'kubrick'), get_the_category_list(', ')); ?> | 
    						
    					   <?php edit_post_link(__('Edit', 'kubrick'), '', ' | '); ?>
    						
    					   <a class="page" href="<?php comments_popup_link(__('No Comments ', 'kubrick'), __('1 Comment ', 'kubrick'), __('% Comments ', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
    					</span>
    				</p>
    
    			</div>
    
    		<?php endwhile; ?>

  14. #89
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    This should be better
    PHP Code:
    <p>
       <?php the_tags(__('Tags:''kubrick'), ', ''<br />'); ?> 
            <span class="postmeta"><?php printf(__('Posted in ''kubrick'), the_category(', ')); ?> | 
                            
               <?php edit_post_link(__('Edit''kubrick'), ''' | '); ?>
                            
               <?php comments_popup_link(__('No Comments »''kubrick'), __('1 Comment »''kubrick'), __('% Comments »''kubrick'), 'page'__('Comments Closed''kubrick') ); ?>
            </span>
    </p>

  15. #90
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It is putting the category name link before 'Posted in' phrase...previously it followed it...like 'Posted in HTML/CSS' but now it is 'HTML/CSS Posted in'. Also, now there's a question mark sign next to the comments..can it be removed?

  16. #91
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    Sorry, I forgot the "%s". Are you sure you use "#187" for all three "Comments"?
    i.e. should be written as &#187;

    PHP Code:
    <p>
       <?php the_tags(__('Tags:''kubrick'), ', ''<br />'); ?> 
            <span class="postmeta"><?php printf(__('Posted in %s''kubrick'), the_category(', ')); ?> | 
                            
               <?php edit_post_link(__('Edit''kubrick'), ''' | '); ?>
                            
               <?php comments_popup_link(__('No Comments ''kubrick'), __('1 Comment ''kubrick'), __('% Comments ''kubrick'), 'page'__('Comments Closed''kubrick') ); ?>
            </span>
    </p>

  17. #92
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I added "%s" but the category name is still before 'Posted in'.

    Sorry, what is '#187' ?

  18. #93
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    By #187 I mean the HTML entity for the double arrow glyph
    Instead of having in your archive.php file it should be the entity instead.

    Try this
    PHP Code:
    <p>
        <?php the_tags(__('Tags:''kubrick'), ', ''<br />'); ?> 
        <span class="postmeta">
        <?php printf(__('Posted in ''kubrick')); printf(__(the_category(', '), 'kubrick')); ?> | <?php edit_post_link(__('Edit''kubrick'), ''' | '); ?>
        <?php comments_popup_link(__('No Comments &#187;''kubrick'), __('1 Comment &#187;''kubrick'), __('% Comments &#187;''kubrick'), 'page'__('Comments Closed''kubrick') ); ?>
        </span>
    </p>

  19. #94
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I changed it. Now it is showing . Thanks.

    Also it is putting the category name link before 'Posted in' phrase...previously it followed it...like 'Posted in HTML/CSS' but now it is 'HTML/CSS Posted in'.

  20. #95
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    Are you certain you are using my most recent code example? It looks like you missed the semi-colon after the entity number.

  21. #96
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You are right, Mittineague. I DID miss semi-colon. Thanks for catching this for me. It is now showing 'Posted in HTML/CSS' correcly.

    I was wondering what would be the correct way to apply the same class="page" to 'HTML/CSS' part of 'Posted in HTML/CSS' phrase to style it the same way as 'Read more' or 'Comments' links ?

  22. #97
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    I've looked a bit but didn't see anything that would allow passing a class value as an argument
    CSS isn't my strong point but you might be able to add a selector to the CSS rules you have for the class "page" without messing things up.
    HTML Code:
    <p>
            <span class="postmeta">
                  Posted in <a href="http://prygara.com/blog/category/html-css/" title="View all posts in HTML/CSS" rel="category tag">HTML/CSS</a> |   
                             <a href="http://prygara.com/blog/2013/08/03/htmlcss-test-post-2/#respond" class="page"  title="Comment on HTML/CSS test post # 2">No Comments </a>
            </span>
    </p>
    i.e. try
    p span.postmeta a

    @ronpat ; agreed?

  23. #98
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is the code from single.php generating 'Categorized as......' line at the bottom of each post. I guess I should somehow apply class=' ' to
    Code:
    _e(the_category(', '), 'kubrick'); ?>
    part.....not sure...

    Code:
    <span class="postmeta">
    <?php printf(__('Published %1$s | ', 'kubrick'), get_the_time('F, Y'));
    _e('Categorized as ', 'kubrick');
    _e(the_category(', '), 'kubrick'); ?> | 
    <?php	printf(__("<a class='page' href='%s'>RSS 2.0</a> feed","kubrick"), get_post_comments_feed_link()); ?>
    </span>
    I think there's no 'a href' link that I can address with CSS...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •