Jump to content


Photo
- - - - -

Need help with child them

theme css

Best Answer James B , 06 December 2013 - 07:23 AM

I'm not a developer but I would imagine you'd need to use a hook to do this using php something like on the link below, but giving it a pre-set page id when it's created.

 

http://wpsnipp.com/i...eme-activation/

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 eholland7080

eholland7080

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 05 December 2013 - 04:51 PM

Hello

I am in the process of creating a child theme.  I need to have a different background image per page and can easily accomplish this via CSS.  My is problem is I am using page id number in the CSS to get the different background image to appear on each page so what is going to happen when a user of my child theme uses it as the page id numbers will be different in the clients set-up.  I'm sure this is a noob question, but can't seem to find the answer on the inter-webs.

Thanks in advance

Eric



#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 05 December 2013 - 05:00 PM

if the pages are archives or author pages etc they have specific body classes, obviously using page ID numbers isnt really transferable unless your child theme creates these pages on activation.



#3 eholland7080

eholland7080

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 05 December 2013 - 05:02 PM

Thank you Simon_P!

 

These are standard pages and it would be great to have them created on activation.  With that said, how do I get my child theme to create them on activation?

 

Thank you advance

Eric



#4 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 06 December 2013 - 07:23 AM   Best Answer

I'm not a developer but I would imagine you'd need to use a hook to do this using php something like on the link below, but giving it a pre-set page id when it's created.

 

http://wpsnipp.com/i...eme-activation/



#5 eholland7080

eholland7080

    Advanced Member

  • Members

  • 31 posts
  • Country: Country Flag

Posted 10 December 2013 - 04:12 PM

Hi guys

Thank you for the replies and link.  Got me going in the right direction.  I appreciate it.  We can mark this one resolved :)

Thanks

Eric



#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 15626 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 11 December 2013 - 10:06 AM

Thanks for informing us the issue has been resolved.







Also tagged with one or more of these keywords: theme, css