• 0
Sign in to follow this  
Followers 0

(HELP) I need custom content for Home, author and category pages.

Question

Posted · Report post

I am trying to figure out how I can post some static custom content the Homepage and each author and category page while not loosing the dynamic postings from each of these pages. Examples: -A image slider on just the homepage, not showing up when you click on a category or author or article but not a static page. Still pulling in "the loop". -A picture and bio before the posts on each of my authors pages for example. (http://domain.com/author/billybob) -A picture and some info about a category for each category page. (http://domain.com/category/AnyCategory_I_SetUp/) ??? Maybe there is a way to use the "feature" sider to do this and create feature sets for each author, category, and the home page??? If someone could point me in a direction I would appreciate it. (I have some limited html and PHP capacity especially if I am given an example.) Thanks!!!! (Platform Pro on Wordpress 3.1.2)

Share this post


Link to post
Share on other sites

9 answers to this question

  • 0

Posted · Report post

-A image slider on just the homepage, not showing up when you click on a category or author or article but not a static page. Still pulling in "the loop".
It's possible to only display an image slider (or feature slider) on just the home page as long as you disable it all other pages on your site.
A picture and bio before the posts on each of my authors pages
You'll need to create an author page first. This might be the kind you're looking for: http://wpsplash.com/how-to-create-a-wordpress-authors-page/
??? Maybe there is a way to use the "feature" sider to do this and create feature sets for each author, category, and the home page???
If you create different feature sets for different pages, it's possible to set them up accordingly in the editor for each page.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thank you Catrina for responding but none of my issues were resolved.

It's possible to only display an image slider (or feature slider) on just the home page as long as you disable it all other pages on your site.
I have done this but how do I then disable it for the author and category pages ie: http://domain.com/author/authorX'>http://domain.com/author/authorX and http://domain.com/category/categoryX Is there a way to have it on by default on the homepage and off by default everywhere else?
You'll need to create an author page first. This might be the kind you're looking for: http://wpsplash.com/how-to-create-a-wordpress-authors-page/
Not quite what I was asking for. Wordpress auto generates a n author page ie:http://domain.com/author/authorX'>http://domain.com/author/authorX and brings in from the loop all of his or her posts. How do add some custom static content to that page? I feel it should be possible something like "if author id= x display post x before the loop" But I don't know where I would input this.
If you create different feature sets for different pages, it's possible to set them up accordingly in the editor for each page.
There is no editor page for auto generated author and category pages, that I know of.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I have done this but how do I then disable it for the author and category pages ie: http://domain.com/author/authorX and http://domain.com/category/categoryX Is there a way to have it on by default on the homepage and off by default everywhere else?
How did you go about trying it? Go to platformpro > template setup and click "advanced setup" on the "pagelines features" drag-and-drop box. Select the "hide this by default" checkbox and it will be hidden on all pages except the blog page. I just tried it and it doesn't show up on author/category pages. If you did do this and it didn't get hidden for you, you could add this to platformpro > settings > custom code > custom css: `.author .category #feature {display:none;}`
-A picture and bio before the posts on each of my authors pages for example. (http://domain.com/author/billybob) -A picture and some info about a category for each category page. (http://domain.com/category/AnyCategory_I_SetUp/)
You can use wordpress's `is_author()` and `is_category()` conditionals with hooks. As a basic example, this would put "Hello, Alice!" on her author page if her id=24. This would go in the platformbase/functions.php file: ` function alices_author_page() { if(is_author('24')): ?>

Hello, Alice!

<?php endif; } ` `add_action('pagelines_before_theloop', 'alices_author_page');` Same idea for categories. More info about hooks and the relevant wordpress conditionals: http://www.pagelines.com/docs/base-child-theme http://codex.wordpress.org/Conditional_Tags#An_Author_Page http://codex.wordpress.org/Function_Reference/is_category

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Tim you are amazing!! The first part of my question has been resloved.

Is there a way to have it on by default on the homepage and off by default everywhere else?
I put a Feature section on the Posts Pages and then used your css trick but I had to change the syntax
	.author #feature, .category #feature {display:none;}

Now to start working on the other stuff as well.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

ok getting errors from trying is_author my hook

// Cams_Author Hook --------//
		// Add author info to author page.
		// add_action('hook_name','function name');
	             add_action('pagelines_after_secondnav','add_author_info_on_author_page');
	
		// function name
		function add_author_info_on_author_page(){
		function is_author() {
			?>
			<div id="postauthor" >This is the post author</div>
		        <?php
	                                           ;}
	                                                            ;}
		// end function

the error I get from it

Fatal error: Cannot redeclare is_author() (previously declared in /home/content/73/7702473/html/wp-includes/query.php:207) in /home/content/73/7702473/html/wp-content/themes/platformbase/functions.php on line 74
Thoughts? Suggestions?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

`function is_author() {` should be `if(is_author()) {`

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Turns out Pagelines has what I want I just cant get it to work where I want it. section.postauthor.php trying currently to override section.postauthor.php in the child theme and just tell it to work with all pages but I can 't seem to get the section override to work...

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

SUCCESS!! Well sort of/almost I have what I want where I want it except the graviton is off in its own world I think that is a css/html issue though. Thanks for all your help Tim!!

// Cams_Author Hook --------//
		// Add author info to author page.
	
		// add_action('hook_name','function name');
	            add_action('pagelines_before_postsinfo','add_author_info_on_author_page');
	
		// function name
		function add_author_info_on_author_page(){
		if(is_author()) {
	
	        global $post;
		setup_postdata($post);
	?>
			<div class="author-info">
				<div class="author-thumb">
					<?php echo get_avatar(get_the_author_meta('email', $post->post_author), $size = '80', $default = CORE_IMAGES. '/avatar_default.gif' ); ?>
				</div>
				<small class="subtext"><?php _e('About The Author', 'pagelines');?></small>
				<h2>
					<?php echo get_the_author(); ?>
				</h2>
				<p><?php the_author_meta('description', $post->post_author); ?></p>
				<div class="author-details">
					" target="_blank">
					<?php _e('Visit Authors Website', 'pagelines');?> →
					
				</div>
			</div>
			<div class="clear"></div>
	<?php
	                                           ;}                                                                            ;}
		// end function[/code]

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

It would also be cleaner if I could figure out how to use section.postauthor.php anyplace I want on the site.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0