Forum Replies Created

Viewing 15 replies - 1 through 15 (of 34 total)
  • Forum: Fixing WordPress
    In reply to: List of titles
    Thread Starter sirthaddeus

    (@sirthaddeus)

    my apologies, I finally found the answer on my own!

    Answer

    Thread Starter sirthaddeus

    (@sirthaddeus)

    Thread Starter sirthaddeus

    (@sirthaddeus)

    Got the “Warning…..” error fixed.

    But I am back to getting this error:

    Parse error: syntax error, unexpected T_ENDIF in public_html/blog/wp-content/themes/mytheme/productcatalog.php on line 67

    On line 67 is </html>

    here is my code:

    <?php
    /*
    Template Name: Product Catalog
    */
    
    get_header(); ?> <!-- header include -->
    
    <div id="left">
    	<div id="left-top">
    			<h2>Product Catalog</h2>
    		</div><!-- end left-top -->	
    
    		<div class="blog-content">
    			<?php query_posts('cat=3&showposts=3&order=ASC&orderby=post_title'); ?>
    			<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    
    			<h2><?php the_title(); ?></h2>
    			<p>
    				<?php the_content(); ?>
    			</p>
    
    			<?php endwhile; ?>
    		</div><!-- end blog-content -->	
    
    			<?php else : ?>
    
                <div class="post" id="post-<?php the_ID(); ?>">
                    <h2><?php _e('Nothing Here'); ?></h2>
                </div>
    
    			<?php endif; ?>
    			<?php
    				$pagelist = get_pages('sort_column=menu_order&sort_order=asc');
    				$pages = array();
    				foreach ($pagelist as $page) {
    				   $pages[] += $page->ID;
    				}
    
    				$current = array_search($post->ID, $pages);
    				$prevID = $pages[$current-1];
    				$nextID = $pages[$current+1];
    			?>
    
    			<div class="catalog-pages">
    				<?php if (!empty($prevID)) { ?>
    					<p>
    						<a href="<?php echo get_permalink($prevID); ?>" title="<?php echo get_the_title($prevID); ?>">Previous</a>
    					</p>
    				<?php if (!empty($nextID)) { ?>
    					<p>
    						<a href="<?php echo get_permalink($nextID); ?>" title="<?php echo get_the_title($nextID); ?>">Next</a>
    					</p>
    
    			</div><!-- end catalog-pages -->
    
    </div><!-- end left -->
    
    <?php get_sidebar(); ?> <!-- sidebar include -->
    
    <?php get_footer(); ?> <!-- footer include -->
    
    </div> <!-- wrap end -->
    </body>
    </html>

    What is causing this error?

    Thread Starter sirthaddeus

    (@sirthaddeus)

    got it to work, not sure what the issue was but thanks for the help.
    Now i am recieving a new error about my header:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /public_html/blog/wp-content/themes/mytheme/productcatalog.php:9) in /public_html/blog/wp-content/themes/mytheme/header.php on line 2

    My line two is the following:

    /*

    Which is part of the template declaration.

    Whats up now?

    Also my posts_nav_link arent working.

    Thread Starter sirthaddeus

    (@sirthaddeus)

    I have added your script at the top replacing:

    <?php query_posts('cat=3&showposts=3&order=ASC&orderby=post_title'); ?>
    			<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>

    Still nothing showing

    Also, reason I created page, is i want to make the category password protected.

    Thread Starter sirthaddeus

    (@sirthaddeus)

    yep sure did, none of the post are appearing

    Thread Starter sirthaddeus

    (@sirthaddeus)

    here is my code:

    <?php
    /*
    Template Name: Product Catalog
    */
    ?>
    
    <?php get_header(); ?> <!-- header include -->
    
    <div id="left">
    	<div id="left-top">
    			<h2>Product Catalog</h2>
    		</div><!-- end left-top -->	
    
    		<div class="blog-content">
    			<?php query_posts('cat=3&showposts=3&order=ASC&orderby=post_title'); ?>
    			<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    			<!--<h2><?php //the_title(); ?></h2>-->
    			<p>
    				<?php the_content(); ?>
    			</p>
    
    			<?php endwhile; ?>
    		</div><!-- end blog-content -->	
    
    			<?php else : ?>
    
                <div class="post" id="post-<?php the_ID(); ?>">
                    <h2><?php _e('Nothing Here'); ?></h2>
                </div>
    
            <?php endif; ?>
    
    		<div class="catalog-pages">
    			<p>
    				<?php posts_nav_link('<span style="padding-left: 450px"></span>','Previous','Next'); ?>
    			</p>
    		</div><!-- end catalog-page numbers -->
    
    </div><!-- end left -->
    
    <?php get_sidebar(); ?> <!-- sidebar include -->
    
    <?php get_footer(); ?> <!-- footer include -->
    
    </div> <!-- wrap end -->
    </body>
    </html>

    I added your query_post idea and it didn’t seem to work.

    Forum: Themes and Templates
    In reply to: category page
    Thread Starter sirthaddeus

    (@sirthaddeus)

    I think I found how to directly call to the page in my browser.

    I use this link:

    https://www.my-domain.com/blog/?cat=3

    When I do I get this error now:

    Parse error: syntax error, unexpected $end in /public_html/blog/wp-content/themes/mytheme/category-3.php on line 33

    The bit of code on line 33 is </html>

    Why would this be causing an error now?

    Thread Starter sirthaddeus

    (@sirthaddeus)

    i figured it out without the use of plugins:

    used the following code:

    <?php query_posts('cat=1&showposts=3'); ?>

    place it right above:

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

    Changed it to the category i wanted to display.

    Forum: Fixing WordPress
    In reply to: Post titles
    Thread Starter sirthaddeus

    (@sirthaddeus)

    thanks got it working!

    Thread Starter sirthaddeus

    (@sirthaddeus)

    makes the homepage disappear all together

    Thread Starter sirthaddeus

    (@sirthaddeus)

    bump,

    any way i can just have my category list on the homepage of my blog?

    When I try adding the php code from the sidebar into the index page it

    Forum: Themes and Templates
    In reply to: category pages
    Thread Starter sirthaddeus

    (@sirthaddeus)

    I thank you moshu for your help.

    Forum: Themes and Templates
    In reply to: category pages
    Thread Starter sirthaddeus

    (@sirthaddeus)

    Because I type in the url to the category-3.php and it just references my whole blog and not the category page.

    I created teh template file (category-3.php) by copying archive.php since I had no category.php page as stated on the link you provided.

    How would I link that template file that wp creates for my category to my created category-3.php file?

    Forum: Themes and Templates
    In reply to: category pages
    Thread Starter sirthaddeus

    (@sirthaddeus)

    I created created a category-3.php page that is suppose to reference my category that has the url of https://www.mydomain.com/blog/?cat=3

    Is that what you mean it will know when to use it or did I do something wrong?

Viewing 15 replies - 1 through 15 (of 34 total)