SitePoint Sponsor

User Tag List

Page 3 of 4 FirstFirst 1234 LastLast
Results 51 to 75 of 98
  1. #51
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    Hi, Sergiy,

    Allow me to take a wild shot at this.

    Wherever this PHP code is located, please make two changes and tell me if they make any difference at all. Delete the quote-percent-s and the </a> that are colored red:
    Code:
    <?php the_tags(__('Tags:', 'kubrick'), ', ', '<br />'); ?> 
    
    <span class="postmeta"><?php printf(__('Posted in <a class="page" href="%s', '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') ); ?></a>
    </span>
    The altered code should look like this:
    Code:
    <?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>
    Let me know what happens. Post the PHP and raw HTML (with the PHP calls) if necessary, and a link to the current test page, of course .

  2. #52
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi Ron,

    That chunk of code you are referring to is from archive.php file which is part of the WordPress theme template. I just did as you suggested. It looks like it's not working for me.

    If you click on "categorized as" (within a single post) or "comment" links, it's giving "error 404 - page not found" which I guess is a broken link error....

    http://prygara.com/blog/2013/07/30/h...d/%3Ca%20href=

    I think clicking on "Categorized as HTML/CSS " should give all posts in that specific category.

    Code:
    <?php get_header();?>
    
    <?php get_sidebar(); ?>
    
    
    	<div id="rightcol" role="main">
    
    		<?php if (have_posts()) : ?>
    
     	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
     	  <?php /* If this is a category archive */ if (is_category()) { ?>
    		<?php printf(__(''), single_cat_title('', false)); ?>
     	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
    		<h2 class="link"><?php printf(__('Posts Tagged %s', 'kubrick'), single_tag_title('', false) ); ?></h2>
     	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    		<h2 class="pagetitle"><?php printf(_c('Archive for %s|Daily archive page', 'kubrick'), get_the_time(__('F jS, Y', 'kubrick'))); ?></h2>
     	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    		<?php printf(_c(''), get_the_time(__('F, Y', 'kubrick'))); ?>
     	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    		<h2 class="pagetitle"><?php printf(_c('Archive for %s|Yearly archive page', 'kubrick'), get_the_time(__('Y', 'kubrick'))); ?></h2>
    	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    		<h2 class="pagetitle"><?php _e('Author Archive', 'kubrick'); ?></h2>
     	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    		<h2 class="pagetitle"><?php _e('Blog Archives', 'kubrick'); ?></h2>
     	  <?php } ?>
    
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'kubrick')); ?></div>
    			<div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'kubrick')); ?></div>
    		</div>
    
    		<?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; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'kubrick')); ?></div>
    			<div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'kubrick')); ?></div>
    		</div>
    	<?php else :
    
    		if ( is_category() ) { // If this is a category archive
    			printf("<h2 class='center'>".__("Sorry, but there aren't any posts in the %s category yet.", 'kubrick').'</h2>', single_cat_title('',false));
    		} else if ( is_date() ) { // If this is a date archive
    			echo('<h2>'.__("Sorry, but there aren't any posts with this date.", 'kubrick').'</h2>');
    		} else if ( is_author() ) { // If this is a category archive
    			$userdata = get_userdatabylogin(get_query_var('author_name'));
    			printf("<h2 class='center'>".__("Sorry, but there aren't any posts by %s yet.", 'kubrick')."</h2>", $userdata->display_name);
    		} else {
    			echo("<h2 class='center'>".__('No posts found.', 'kubrick').'</h2>');
    		}
    	  get_search_form();
    	endif;?>
    	
    	</div>
    
    
    
    <?php get_footer(); ?>

  3. #53
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    Hi, Sergiy. Welcome back

    Looking at the PHP that you posted, something strikes me as odd:
    Code:
    <?php get_header();?>
    
    <?php get_sidebar(); ?>
    
    
        <div id="rightcol" role="main">
    
            <?php if (have_posts()) : ?>
    
          <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
          <?php /* If this is a category archive */ if (is_category()) { ?>
            <?php printf(__(''), single_cat_title('', false)); ?>
          <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
            <h2 class="link"><?php printf(__('Posts Tagged ‘%s’', 'kubrick'), single_tag_title('', false) ); ?></h2>
          <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
            <h2 class="pagetitle"><?php printf(_c('Archive for %s|Daily archive page', 'kubrick'), get_the_time(__('F jS, Y', 'kubrick'))); ?></h2>
          <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
            <?php printf(_c(''), get_the_time(__('F, Y', 'kubrick'))); ?>
          <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    The percent-s is surrounded by curly quotes. Normally that is not allowed. Any reason to believe that might be an error? We really need a PHP person to help you with this. I'm very out of my element with PHP.

    I think we need a link to the PHP file so we can read the code directly. A look at the raw HTML with the PHP calls might help, too. Don't really know.

  4. #54
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    These are a couple of informational observations about the current issue of broken links as a memory jogger. No conclusions being drawn.
    (I used the square brackets to indicate clickable links)

    From this page:
    http://prygara.com/blog/

    Click this link(s):
    [HTML/CSS test post # 2] or [Read more]
    http://prygara.com/blog/2013/08/03/htmlcss-test-post-2/

    Go to this URL successfully:
    http://prygara.com/blog/2013/08/03/htmlcss-test-post-2/

    Published August, 2013 | Categorized as [HTML/CSS] | RSS 2.0 feed
    http://prygara.com/blog/2013/08/03/h...2/%3Ca%20href= /* on this page, this URL is broken */
    http://prygara.com/blog/2013/08/03/htmlcss-test-post-2/<a href= /* this is what it looks like */

    Published August, 2013 | Categorized as HTML/CSS | [RSS 2.0] feed
    http://prygara.com/blog/2013/08/03/h...t-post-2/feed/ /* this URL is good */

    [Comments]
    http://prygara.com/blog/2013/08/03/h...2/%3Ca%20href= /* this URL is broken, same as above */




    From this page:
    http://prygara.com/blog/

    Click this link(s):
    [HTML/CSS test post # 1] or [Read more]
    http://prygara.com/blog/2013/07/30/hello-world/

    Go to this URL successfully:
    http://prygara.com/blog/2013/07/30/hello-world/

    Published July, 2013 | Categorized as [HTML/CSS] | RSS 2.0 feed
    http://prygara.com/blog/2013/07/30/h...d/%3Ca%20href= /* this URL is broken, same as above */

    Published July, 2013 | Categorized as HTML/CSS | [RSS 2.0] feed
    http://prygara.com/blog/2013/07/30/hello-world/feed/ /* this URL is good */

    [1 Comment]
    http://prygara.com/blog/2013/07/30/h...d/%3Ca%20href= /* this URL is broken, same as above */


    The same pattern and error is true for JavaScript and Fireworks posts.



    On this page:
    http://prygara.com/blog/category/html-css/

    HTML/CSS test post # 2
    http://prygara.com/blog/2013/08/03/htmlcss-test-post-2/

    [No Comments >>]
    http://prygara.com/blog/category/html-css/| /* This URL is picking up the pipe from the PHP code, thus it fails. */

    HTML/CSS test post # 1
    http://prygara.com/blog/2013/07/30/hello-world/

    [1 Comment ]
    http://prygara.com/blog/category/html-css/| /* This URL is picking up the pipe from the PHP code, thus it fails. */

  5. #55
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here's the PHP file

    https://drive.google.com/file/d/0B6n...it?usp=sharing

    I tried surrounding percent-s by single quotes before - it did not work for me.

    I also think a PHP person would be helpful in this.

    Thanks Ron.

    PS If it's not working, I might consider using a blog page on my later projects when I am more familiar how WordPress works. It's not a big deal at the moment.

  6. #56
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Don't get hung up on grammatical correctness or aesthetics, quotes aren't crucial during development, take them out for now, put a /* comment */ and get back to them later.

    What I'm wondering about is the "kubrick" domain, it's been retired for a while http://theme.wordpress.com/retired/kubrick/
    Are you still using it?

  7. #57
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    yes, the blog page uses kubrick's theme. I know it's out of date and not supported anymore by WP but I spoke with my host support and they said it should work on their end as long as all done correctly. not sure....

  8. #58
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    @Mittineague , Looking at the example links in post 54, can you determine why is this link malformed?

    http://prygara.com/blog/2013/08/03/h...2/%3Ca%20href=

    It seems to me that the error must be in the construct of the PHP, and I'm assuming the code in the PHP file that is being called is shown (but the code must be wrong).

    @810311 , Will you please post the raw HTML showing the PHP calls so we can see those calls and assure that we are looking at the right PHP file.

    If we can make the failing links work, I think we will be a giant step closer to solving the issue.

  9. #59
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Here's the problem mark-up
    Code HTML4Strict:
    <p class="postmetadata alt">
    	<span class="postmeta">Published August, 2013 | Categorized as <a class="page" href="<a href="http://prygara.com/blog/category/html-css/" title="View all posts in HTML/CSS" rel="category tag">HTML/CSS</a>  | </a>
    	<a class='page'href='http://prygara.com/blog/2013/08/03/htmlcss-test-post-2/feed/'>RSS 2.0</a> feed</span> 
    				</p>	
    			</div>
    		</div>
    <!-- You can start editing here. -->
    			<!-- If comments are open, but there are no comments. -->
    <p><a class="page postmeta" href="<a href="http://prygara.com/blog/2013/08/03/htmlcss-test-post-2/#respond" title="Comment on HTML/CSS test post # 2">Comments</a></a></p>
    The <a link's href values should not be <a links
    Question is how are they getting there?

    On javascript test post #1 and fireworks test post #1 the Comments and Categorized links are similarly broken, presumably elsewhere as well, didn't check.

    Maybe copy/pasted a link into fields that should be a URL?

  10. #60
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ronpat View Post
    @810311 , Will you please post the raw HTML showing the PHP calls so we can see those calls and assure that we are looking at the right PHP file.
    Sorry Ron I am not exactly sure how to do that....I guess it's not just copying and pasting HTML mark up from blog.html ...? I did not understand the part with "PHP calls" and how to do that.

  11. #61
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by 810311 View Post
    Sorry Ron I am not exactly sure how to do that....I guess it's not just copying and pasting HTML mark up from blog.html ...? I did not understand the part with "PHP calls" and how to do that.
    On second look, I believe that you DID post the raw HTML earlier. There was so many PHP calls on the page that I did not recognize it as the primiary page. (Did I mention that I'm out of element doodling with PHP? ) Let me give them another going-over and see if anything clicks.

    Troubleshooting would probably be a lot easier if I had a localhost server set up on my PC. Oh, well.

    Will get back with you in a bit.

  12. #62
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No worries. Thanks Ron. If you can copy and paste an example of what you call a "PHP call"....just to take a look.

  13. #63
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    It can be confusing. In fact I've heard many say that "mixing HTML mark-up with PHP code" is a poor way to do it. Besides the point, it is very common and that's how WordPress does it.

    "calls" is more technically "function calls" eg.
    get_the_time(
    the code is "calling" the get_the_time function.

    Functions can just do something, or "return" something to where it was "called" so whatever was returned can be used somehow.

    I downloaded theme version 1.7.2 but didn't find any files any where with the string "Published" .
    I'm guessing I have a different version than you're using or you edited single.php?

    Can you find and post the code between
    PHP Code:
    <class="postmetadata alt">
    .....
    </
    p

  14. #64
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    Hi, Sergiy,

    (I picked the following file just so we have a URL we can refer to. There are others.)

    Open the following file in your browser.
    http://prygara.com/blog/2013/08/03/f...test-post-2-2/
    (the "Fireworks" and "Comments" links on that page will fail.)

    Then "Show Page Source".

    The following lines in this file demonstrate the problem with the links:

    {lines 133-134)
    Code:
    <span class="postmeta">Published August, 2013 | Categorized as <a class="page" href="<a href="http://prygara.com/blog/category/fireworks/" title="View all posts in Fireworks" rel="category tag">Fireworks</a>  | </a>
    <a class='page'href='http://prygara.com/blog/2013/08/03/fireworks-test-post-2-2/feed/'>RSS 2.0</a> feed</span>
    (line 154)
    Code:
    <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>
    You cannot nest an anchor tag inside of another anchor tag.

    (If you use Firefox with the HTML Validator plug-in, parts of those lines will be highlighted in RED.)

    The items that I have marked in RED should not be in that PHP file.

    That PHP file contains the words: "Published" and "Categorized as" (as @Mittineague pointed out.)

    archive.php is not that file.

    If you can find that file, I believe we can make progress. It seems to be the culprit.


    Aside:
    My "programming" history consists mostly of writing Unix Shell scripts a long time ago. Efficient Shell scripts use functions... "function calls" summon those functions. The functions do something and return a value. That's where I learned the term "call". "Call" is synonymous with "go do/get something then return". My only use for PHP has been to "call" "includes"... the terminology fits.
    Perhaps I should refer to PHP code as statements?

  15. #65
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Can you find and post the code between
    PHP Code:
    <class="postmetadata alt">
    .....
    </
    p

    I edited single.php. I found the code you are referring to in single.php file. If I understood correctly call = function in PHP.


    PHP Code:
    <p class="postmetadata alt">
                        
    <?php /* This is commented, because it requires a little adjusting sometimes.
    You'll need to download this plugin, and follow the instructions:
    http://binarybonsai.com/wordpress/time-since/ */
    /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); $time_since = sprintf(__('%s ago', 'kubrick'), time_since($entry_datetime)); */ 
    ?>
        
    <span class="postmeta"><?php printf(__('Published %1$s | Categorized as <a class="page" href="%3$s  | ''kubrick'), get_the_time(__('F, Y''kubrick')),     get_the_time(), get_the_category_list(', ')); ?></a> 

                            <?php printf(__("<a class='page'href='%s'>RSS 2.0</a> feed","kubrick"), get_post_comments_feed_link()); ?></span> 

                            <?php if ( comments_open() && pings_open() ) {
                                
    // Both Comments and Pings are open ?>
                                <?php printf(__('''kubrick'), get_trackback_url()); ?>

                            <?php } elseif ( !comments_open() && pings_open() ) {
                                
    // Only Pings are Open ?>
    <?php printf
    (__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.''kubrick'), get_trackback_url()); ?>

                            <?php } elseif ( comments_open() && !pings_open() ) {
                                
    // Comments are open, Pings are not ?>
                                <?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.''kubrick'); ?>

                            <?php } elseif ( !comments_open() && !pings_open() ) {
                                
    // Neither Comments, nor Pings are open ?>
                                <?php _e('Both comments and pings are currently closed.''kubrick'); ?>

                            <?php edit_post_link(__('''kubrick'),'',''); ?>

    </p>

  16. #66
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ronpat View Post
    ........You cannot nest an anchor tag inside of another anchor tag.

    .......That PHP file contains the words: "Published" and "Categorized as" (as @Mittineague pointed out.)

    archive.php is not that file.If you can find that file, I believe we can make progress. It seems to be the culprit.
    Hi Ron, you are right - I found those strings in single.php as was previously mentioned by Mittineague. Below is the full content of single.php:

    PHP Code:
    <?php get_header(); ?>

    <?php get_sidebar(); ?>

        <div id="rightcol" role="main">

        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

            
            <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                <h2><?php the_title(); ?></h2>

                <div class="entry">
                    <?php the_content('<p class="serif">' __('Read the rest of this entry &raquo;''kubrick') . '</p>'); ?>

                    <?php wp_link_pages(array('before' => '<p><strong>' __('Pages:''kubrick') . '</strong> ''after' => '</p>''next_or_number' => 'number')); ?>
                    <?php the_tags'<p>' __('Tags:''kubrick') . ' '', ''</p>'); ?>

                    <p class="postmetadata alt">
                        
                            <?php /* This is commented, because it requires a little adjusting sometimes.
                                You'll need to download this plugin, and follow the instructions:
                                http://binarybonsai.com/wordpress/time-since/ */
                                /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); $time_since = sprintf(__('%s ago', 'kubrick'), time_since($entry_datetime)); */ 
    ?>
                    <span class="postmeta"><?php printf(__('Published %1$s | Categorized as <a class="page" href="%3$s  | ''kubrick'), get_the_time(__('F, Y''kubrick')), get_the_time(), get_the_category_list(', ')); ?></a>
                            <?php printf(__("<a class='page'href='%s'>RSS 2.0</a> feed","kubrick"), get_post_comments_feed_link()); ?></span> 

                            <?php if ( comments_open() && pings_open() ) {
                                
    // Both Comments and Pings are open ?>
                                <?php printf(__('''kubrick'), get_trackback_url()); ?>

                            <?php } elseif ( !comments_open() && pings_open() ) {
                                
    // Only Pings are Open ?>
                                <?php printf(__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.''kubrick'), get_trackback_url()); ?>

                            <?php } elseif ( comments_open() && !pings_open() ) {
                                
    // Comments are open, Pings are not ?>
                                <?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.''kubrick'); ?>

                            <?php } elseif ( !comments_open() && !pings_open() ) {
                                
    // Neither Comments, nor Pings are open ?>
                                <?php _e('Both comments and pings are currently closed.''kubrick'); ?>

                            <?php edit_post_link(__('''kubrick'),'',''); ?>

                        
                    </p>    

                </div>
            </div>

        <?php comments_template(); ?>

        <?php endwhile; else: ?>

            <p><?php _e('Sorry, no posts matched your criteria.''kubrick'); ?></p>

    <?php endif; ?>

        </div>

    <?php get_sidebar(); ?>


    <?php get_footer(); ?>



    Quote Originally Posted by ronpat View Post
    .....Call" is synonymous with "go do/get something then return". My only use for PHP has been to "call" "includes"... the terminology fits.
    Perhaps I should refer to PHP code as statements?
    That's fine, Ron. I think I get the general idea. Anyways, next time if I touch WP theme, would only be changing CSS file...I guess...even though I heard knowing how to customize WP is a good skill to have nowdays....

  17. #67
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the link,Ron. Will bookmark it. Useful stuff.

  18. #68
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    In the file "single.php", would you please make two changes. I don't expect these changes to fix anything major, but they will let us know if we are on the right page (which I believe we are) and it will give me a few more minutes to study the code

    (line 25) Delete the close anchor tag from the end of the line.
    Code:
    <span class="postmeta"> ... </a>
    (line 26) Add a space between 'page' and href by changing this:
    Code:
    <?php printf(__("<a class='page'href='%s'>RSS 2.0</a>
    to this:
    Code:
    <?php printf(__("<a class='page' href='%s'>RSS 2.0</a>

  19. #69
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    This will lose the gettext translating, but for now just to see if it fixes the link problem try
    Code PHP:
    /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); $time_since = sprintf(__('%s ago', 'kubrick'), time_since($entry_datetime)); */ ?>
    <!-- comment out as below, then add new code as shown -->    
    <!--
    <span class="postmeta"><?php // printf(__('Published %1$s | Categorized as <a class="page" href="%3$s  | ', 'kubrick'), get_the_time(__('F, Y', 'kubrick')),     get_the_time(), get_the_category_list(', ')); ?></a> 
     
                            <?php // printf(__("<a class='page'href='%s'>RSS 2.0</a> feed","kubrick"), get_post_comments_feed_link()); ?></span>  
    -->						
            <span class="postmeta"><?php printf(__('Published %1$s', 'kubrick'), get_the_time(__('F, Y', 'kubrick'))); ?>
    		Categorized as <?php the_category(', ') ?>.
                                    <?php post_comments_feed_link('RSS 2.0'); ?></span> 
    <!-- below is OK -->
                                    <?php if ( comments_open() && pings_open() ) {

  20. #70
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    Back to line 25 again....
    Code:
    <span class="postmeta"><?php printf(__('Published %1$s | Categorized as <a class="page" href="%3$s  | '
    The item colored blue, %3$s, appears to be importing the malformed link.

    Do you know where the code being imported by %3$s is located?

    Off Topic:


    Edit: I didn't realize Mittineague was online. I will back out and "read the mail."

  21. #71
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Done

  22. #72
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    This will lose the gettext translating, but for now just to see if it fixes the link problem try
    Code PHP:
    /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); $time_since = sprintf(__('%s ago', 'kubrick'), time_since($entry_datetime)); */ ?>
    <!-- comment out as below, then add new code as shown -->    
    <!--
    <span class="postmeta"><?php // printf(__('Published %1$s | Categorized as <a class="page" href="%3$s  | ', 'kubrick'), get_the_time(__('F, Y', 'kubrick')),     get_the_time(), get_the_category_list(', ')); ?></a> 
     
                            <?php // printf(__("<a class='page'href='%s'>RSS 2.0</a> feed","kubrick"), get_post_comments_feed_link()); ?></span>  
    -->						
            <span class="postmeta"><?php printf(__('Published %1$s', 'kubrick'), get_the_time(__('F, Y', 'kubrick'))); ?>
    		Categorized as <?php the_category(', ') ?>.
                                    <?php post_comments_feed_link('RSS 2.0'); ?></span> 
    <!-- below is OK -->
                                    <?php if ( comments_open() && pings_open() ) {
    Done. Please, take a look at the following:

    http://prygara.com/blog/2013/08/03/f...test-post-2-2/

    As you said, formatting is lost now, but "Fireworks" and "RSS 2.0" links seem to be working on my end. Thanks Mittineague.
    "Comments" link still gives a 404 error...I am guessing this is because I changed a template file associated with this link.....

  23. #73
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 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  | '
    The item colored blue, %3$s, appears to be importing the malformed link.

    Do you know where the code being imported by %3$s is located?

    Off Topic:


    Edit: I didn't realize Mittineague was online. I will back out and "read the mail."
    PHP Code:
    <?php // printf(__('Published %1$s | Categorized as <a class="page" href="%3$s  | ', 'kubrick'), get_the_time(__('F, Y', 'kubrick')),     get_the_time(), get_the_category_list(', ')); ?>
    printf has the syntax
    printf ( string $format [, mixed $args [, mixed $... ]] )
    where args correspond to the substitutions
    1 = get_the_time(__('F, Y', 'kubrick'))
    2 = get_the_time() // this is not being used
    3 = get_the_category_list(', ')

    AFAIK the_category(', ') should return the link not only the URL

    Likewise, post_comments_feed_link('RSS 2.0') returns a link, with the link text being the string that's passed to it

    Ron, don't don't go too far, I'm getting sleepy.

  24. #74
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,537
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    Off Topic:

    Quote Originally Posted by Mittineague View Post
    Ron, don't don't go too far, I'm getting sleepy.
    Daybreak is past my bedtime, too, and it's fast approaching.

    I need a cat nap, so I'm gonna sign off until this afternoon.

  25. #75
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I am tired so this may have some errors but with luck it should be good to go
    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
    		_e(post_comments_feed_link('RSS 2.0 '), 'kubrick');
    		_e('feed', 'kubrick'); ?>
    		</span>

    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


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
  •