Jump to content

Archived

This topic is now archived and is closed to further replies.

eholland7080

Need help with child them

Recommended Posts

eholland7080

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

Share this post


Link to post
Share on other sites
Simon

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.

Share this post


Link to post
Share on other sites
eholland7080

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

Share this post


Link to post
Share on other sites
James B

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/index.php/functions-php/create-page-on-theme-activation/


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
eholland7080

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

Share this post


Link to post
Share on other sites
Danny

Thanks for informing us the issue has been resolved.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • gstrahle
      By gstrahle+
      Hi,
      I am hoping to figure out how I can get my PageLines Full Nav to display layered in front of a sticky footer element on my website - 3keymedia.com
      I would like the Full Nav to overlay the entire screen when opening the menu as you will see when opening on a desktop the footer of nav content is cropped by the sticky footer.
       
      Thanks


    • Christian
      By Christian+
      Hi everyone, since Instagram had allowed to publish in different ratio formats (instead of only square ratio) the grams stripe has different heights. Can you tell me if i can fix it easily with some CSS?
    • Kedark
      By Kedark+
      Hello, I need help. Can and how to do it. I need to add more page appearance templates (page attributes). At the moment it's default and FRAMEWORK A, FRAMEWORK B etc. I need to add two more. How can I do this.
      Unfortunately, I did not find such a thread on the forum.
      Regards
      Radoslaw
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
×