Jump to content
Sign in to follow this  
sapcmc

How to edit header.php of Base Theme and keep future updates?

Recommended Posts

sapcmc

Hi,

I am using the Base Theme and a ecommerce plugin for wordpress - thecartpress.com .

http://thecartpress.com/docs/theme-constructorsdesigners/how-to-display-number-of-items-in-the-header/

In order to display the shopping cart at header of website their documentation states that the header.php of theme should be edited and added the following

<?php $shoppingCart = TheCartPress::getShoppingCart();

printf( '%s item(s) in your <a href="%s">bag</a> – <a href="%s">Checkout</a>', $shoppingCart->getCount(), tcp_get_the_shopping_cart_url(), tcp_get_the_checkout_url() ); ?>

So how can I edit the header.php in the Base Theme as somehow only see it under pagelines template itself located at

˜/wp-content/themes/pagelines

Please assist as I would like this to be future release compatible.

Share this post


Link to post
Share on other sites
James B

Hi there,

You'll need to add this code as a hook into the functions.php inside the base theme. Please take a look at this post for an example of how to do this http://www.pagelines.com/forum/topic/22659-change-social-website-icons/


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
sapcmc

Thanks for the help. I have gonne there but so many replies in the middle that got totally lost ...

Share this post


Link to post
Share on other sites
Danny

Hi,

Editing the core files is not recommend and in doing so will prevent us from providing support. I recommend you do as James suggested and use a hook. If you're unsure how create this hook, I recommend you contact one of our Pros.

http://www.pagelines.com/pros/


Please search our forums, before posting!

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  

  • Similar Content

    • josh1178
      By josh1178
      Digging around I found some seemingly old one by Nick Haskins and another one called Skeleton by an admin on this site. Is there and official bare bones child theme we should be using for DMS 2? This seems like something rather important that would be easy to find, but it's not.
       
      Thanks.
       
    • kellid
      By kellid
      Hello,
       
      I'm trying to add a banner image in the header of my site between the logo and drop down login box to the right.  I've added code to my header.php file but it's above the header and not nested between these two points.  
       
      [post='[ptiframe]61-afj1e3[/ptiframe]']Here[/post] is the code i've used in my header.php file and here is the site...
       
      http://www.dev.modelalliance.org/
       
      I am using pagelines framework, not DMS version 2.2.5.  
       
      Any guidance with this would be Greatly appreciated!
       
      Thank You!
       
      Kelli
    • radroz
      By radroz
      Hey guys, I'm working with Nick's Base Theme for DMS, and I'm having issues trying to get some of the editing features to work. For example, the Rev Slider is not allowing me to give me the edit button to replace the default images.
       
      I've tried this on two sites so far, and it's consistent. Yes, I'm using Chrome on a Mac. HELP
       
      Notice on the screen shot - the edit button shows for the section below it, but not for the REV slider itself.
    • davemoppert
      By davemoppert
      I have a multisite wordpress install using the Pagelines Framework theme. I have created two child themes for Pagelines -- one for the parent site and one for the sub sites. I am trying to get the sub sites to display the same header and footer content as the parent site. Because Pagelines populates it's header and footer content dynamically based on Pagelines settings for each site (and not hard coded), is there any way to serve the header and footer content from the parent site to all of the sub sites?

      Anyone got an idea on how to accomplish this?

      The parent site (using pagelines child theme: kid 2 kid) is here: http://updated-kid2kid.com
      the test subsite (using pagelines child theme: kid 2 kid stores) is here: http://updated-kid2kid.com/test

      My logic is that there might be some code I can add to a header.php file for the /test child theme that will display the header content from the parent site... Open to ideas!

      Thanks!
    • josh1178
      By josh1178
      I'm wanting to make customizations to my pagelines theme.

      I'm wondering the following:
      - Is it still best practice to use the Pagelines Base Theme for all changes?
      - Now that pagelines is 'Less', should I not modify style.css in the base theme?
      - Should I update the Base them everytime a new Pageline update is pushed out? Does it matter?
      - Can I/should I copy the less folder into the base theme folder and make modifications from there?

      Thanks in advance.
×