Jump to content


Photo
- - - - -

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


  • Please log in to reply
9 replies to this topic

#1 camrick

camrick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 09 May 2011 - 11:30 PM

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. (

Please Login or Register to see this Hidden Content

) -A picture and some info about a category for each category page. (

Please Login or Register to see this Hidden Content

) ??? 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)

#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 10 May 2011 - 02:21 AM

-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:

Please Login or Register to see this Hidden Content



??? 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.

#3 camrick

camrick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 10 May 2011 - 09:52 PM

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:

Please Login or Register to see this Hidden Content

and

Please Login or Register to see this Hidden Content



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:

Please Login or Register to see this Hidden Content


Not quite what I was asking for. Wordpress auto generates a n author page ie: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.

#4 timlinson

timlinson

    Advocate

  • Members
  • PipPipPipPipPip
  • 1032 posts

Posted 11 May 2011 - 04:06 AM

I have done this but how do I then disable it for the author and category pages ie:

Please Login or Register to see this Hidden Content

and

Please Login or Register to see this Hidden Content



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. (

Please Login or Register to see this Hidden Content

)

-A picture and some info about a category for each category page. (

Please Login or Register to see this Hidden Content

)

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!

}
`
`add_action('pagelines_before_theloop', 'alices_author_page');`

Same idea for categories. More info about hooks and the relevant wordpress conditionals:

Please Login or Register to see this Hidden Content


Please Login or Register to see this Hidden Content


Please Login or Register to see this Hidden Content



#5 camrick

camrick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 11 May 2011 - 05:23 PM

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

Please Login or Register to see this Hidden Content


Now to start working on the other stuff as well.

#6 camrick

camrick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 13 May 2011 - 06:39 PM

ok getting errors from trying is_author

my hook

Please Login or Register to see this Hidden Content


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?

#7 timlinson

timlinson

    Advocate

  • Members
  • PipPipPipPipPip
  • 1032 posts

Posted 13 May 2011 - 06:42 PM

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

#8 camrick

camrick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 13 May 2011 - 07:06 PM

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...

#9 camrick

camrick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 13 May 2011 - 07:22 PM

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!!

Please Login or Register to see this Hidden Content



#10 camrick

camrick

    Member

  • Members
  • PipPip
  • 12 posts

Posted 13 May 2011 - 07:31 PM

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