StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   Problem in preview (http://www.studiopress.com/support/showthread.php?t=24554)

app2us 03-22-2010 02:13 AM

Problem in preview
 
www.app2us.com/blog

wp version 2.9.2
Education theme version 1.0, purchased and uploaded a few hours ago

Problem: I can see the education theme added as "Available themes" on the "manage themes" page. It has ACTIVATE PREVIEW and DELETE links. When I click PREVIEW, I get this error at the bottom of the preview page:

Catchable fatal error: Object of class WP_Error could not be converted to string in /home/content/html/blog/wp-content/themes/education_10/home.php on line 40

Above message is a hyperlink and if I click, this page opens:

http://app2us.com/blog/%3Cbr/ ( http://app2us.com/blog/<br/ )

I have not Activated, because the actual page could have the same error. So if you access my blog, you will still see the old default theme.
Please help.


The line 40 in home.php is:
<p class="textright"><b><a href="<?php echo get_category_link(get_theme_mod('featured_top_left ')); ?>" rel="bookmark"><?php _e("Read More Posts in", 'studiopress'); ?> <?php echo $featcat; ?></a></b></p>
-----------------------------------------------------------------------------------------------------------

Another problem with the preview:
The posts are visible in one column on the left and right column is completely blank - and no blog categories etc are seen. Is this expected and is some customization required to make stuff appear in the second column?

CharlesClarkson 03-22-2010 03:28 AM

It sounds like you are previewing the post before selecting a category for it. Try selecting a category before the preview. If that doesn't work, save a draft after choosing the category and see if the error disappears. The problem is in the theme code, but we would need to do this test anyway, so give it a try.


HTH,

app2us 03-22-2010 03:37 AM

I went ahead and activated the Education theme so that people helping me can see what I am seeing. My original problem is not there anymore.

However, for the left column, I was expecting to see most recent n posts. However the theme is forcing me to select one particular category and only most recent n posts in that category are displayed [currently I have selected Applications category] - and selecting ALL CATEGORIES is not an option there. I am referring to HOMEPAGE FEATURED LEFT section in the Education theme options.

Thank you very much for your time.

CharlesClarkson 03-22-2010 03:49 AM

Quote:

Originally Posted by app2us (Post 124424)
However, as you can see, the left column is now empty - what customization is needed for posts to appear there?

I see all 3 columns in Firefox 3.6 on Windows Vista.

Apparently, you are working on this right now.


HTH,

app2us 03-22-2010 04:19 AM

yes, I was working. still the problem remains:

However, for the left column, I was expecting to see most recent n posts. However the theme is forcing me to select one particular category and only most recent n posts in that category are displayed - and selecting ALL CATEGORIES is not an option there. I am refering to HOMEPAGE FEATURED LEFT section in the Education theme options.

Thank you very much for your time.

CharlesClarkson 03-22-2010 05:07 AM

Quote:

Originally Posted by app2us (Post 124436)
... and selecting all categories is not an option there.

It never was an option for this theme. You would have to customize the theme to present all categories on the home page.


HTH,

app2us 03-22-2010 02:35 PM

I never thought this could be the case! Almost all blogs display their most recent posts on the home page.

What are the customization steps?

CharlesClarkson 03-22-2010 10:13 PM

Quote:

Originally Posted by app2us (Post 124649)
I never thought this could be the case! Almost all blogs display their most recent posts on the home page.

One of the features of StudioPress themes are they don't look or act like typical blogs.


Quote:

Originally Posted by app2us (Post 124649)
What are the customization steps?

There are no written steps to changing the theme to work like blog, but learning about the WordPress Loop should allow you to edit the home.php theme file to display all posts and the page links necessary to navigate older posts.

Both the index.php and the page_blog.php files have blog styled WordPress Loops in them.


HTH,

app2us 03-22-2010 10:57 PM

Mr. Clarkson,
Very thankful for your replies so far.

But I am unable to achieve the simple task from that page about WordPress Loop. Apparently the last item in this link is about the same task:
http://www.studiopress.com/support/s...ad.php?t=15458

If you want to display all categories on your Blog page, open the page_blog.php file and look for this code:

<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("showposts=".get_theme_mod('blog_cat_n um')."&paged=$page"); while ( have_posts() ) : the_post() ?>

Even after modifying to the above code, it does not show All categories.

All was needed is a "ALL" in the dropdown to select the category to display in the homepage.
So far I am disappointed I upgraded to the Education theme. How can everyone who purchases it be expected to figure out and change code. I dont see why this should not be part of standard tutorial.

app2us 03-23-2010 01:53 AM

Finally figured it out, in home.php:
change
<?php $recent = new WP_Query("cat=".get_theme_mod('featured_top_left') ."&showposts=".get_theme_mod('featured_top_left_nu m')); while($recent->have_posts()) : $recent->the_post();?>

with
<?php $recent = new WP_Query("cat=".all."&showposts=".get_theme_mod('f eatured_top_left_num')); while($recent->have_posts()) : $recent->the_post();?>

Thanks Mr. Clarkson once again.


All times are GMT -5. The time now is 10:07 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.