seppie 0 Report post Posted March 6, 2011 The question inthis thread is exactly what I'm trying to do. Unfortunately, my knowledge base is pretty much zero when it comes to WP, php, etc. So I tried to follow the tutorial but I don't know where to find template.branding.php. How do I get there to drop the code from Dynamic Headers? If you respond, please don't skip steps -- seems like every video I watch or help thread I read assumes that you already know where to find all the theme files, but I haven't been able to find them when I go to wp-content then click on themes then click on platformbase. When I do that, I get directories called images, nggalleries, and sections. There are style sheets called base.css and style.css. I can also click on changelog.text or functions.php, or on screenshot.png. So where do I need to go to actually modify the code? Please help! And again, I apologize for my inability to figure this out on my own -- I'm totally learning from the ground up as I go! Oh, and if I click on the section directory, it just pulls up section.pullquote.php and section.sb_base.php -- nothing like the sections for heading or branding that I've seen referenced in other threads. Thank you! . Share this post Link to post Share on other sites
djb21au 0 Report post Posted March 7, 2011 I'm assuming you are using PlatformPro but if not the answer should be similar. The template.branding.php file is in the PlatformPro theme folder, not the PlatformBase theme folder. The two work together. If you want to drop something, one way to do it is to go into the appropriate file (it sounds like you know which file) and 'comment' it out by placing '/*' and '*/' (without the inverted commas) at either end of the code you want the theme to ignore. That said, it is preferable to make changes like this within the PlatformBase theme by adding the appropriate code to one of the files in there. The reason for that is that future upgrades will replace any changes you've made in the PlatformPro folder. Exactly how you go about making the specific change you want to make via PlatformBase I don't know: you'll need to provide more info (preferably in a new thread) and one of the gurus here will help you out. At the moment I'm having trouble removing code myself. Share this post Link to post Share on other sites
kastelic 6 Report post Posted March 7, 2011 Unfortunately, my knowledge base is pretty much zero when it comes to WP, php, etc. You really shouldn't be modifying core code at all. That is really a last resort, especially with this theme. Almost everything can be solved within the framework using either custom CSS, javascript (in the Custom Code Settings) or utilizing the hooks. http://www.pagelines.com/docs/base-child-theme Share this post Link to post Share on other sites
seppie 0 Report post Posted March 10, 2011 @Jimmy I would be more than happy not to modify core code. In fact, I might kiss the person who told me how to accomplish the same thing (have a different header at the top of each page) using the existing framework! I'm trying to follow the directions for the Dynamic Headers plugin, which someone else on this forum apparently used successfully with Platform Pro. The instructions are: Now you will need to add the template tag created by the plugin to your theme file where you want your dynamic header to appear (this will usually be in wp-content/themes/your-theme-name/header.php). You have 2 options for adding your dynamic header: Option 1 (Recommended): Simply drop the this line of code into your theme file that controls your header (usually header.php) Note: The location to add this code can vary widely from theme to theme and depending on your theme's css settings you may have to use Option 2 and modify the CSS of your theme **BACKUP ANY THEME FILES BEFORE MODIFYING** <?php if(function_exists('show_media_header')){ show_media_header(); } ?> This will automatically determine what type of media you are using and generate the appropriate code to insert it. No other coding is required on your part. Option 2: You can use this line of code to simply get the URL of the media for a particular post or page. This will allow you to do some more advanced things and embed the media yourself if you know what you are doing. <?php if(function_exists('dh_get_page_image_url')){ $dynamic_header_url = dh_get_page_image_url(); } ?> You can then use the variable $dynamic_header_url however you see fit. It will contain the full path to your media file for that particular page/post, including any default media that should be shown. It is advised that most users simply use Option 1 if at all possible, as it is significantly more simple. Note: This function can return NULL or the string 'None' if there are no headers for the current page. So I was trying to figure out where to drop the line of code from Option 1, since it is supposed to be "significantly more simple." I would love any help I can get -- I thought I would be finished putting my site together long before now, but this is a pretty major holdup. Thank you! September Share this post Link to post Share on other sites
bryan-hadaway 3 Report post Posted March 10, 2011 To edit files directly, you find them via: Appearance > Editor If you intend on upgrading your theme when new releases are available you would want to use the Base; details here: http://www.pagelines.com/docs/base-child-theme When you copy files over to base you can directly modify that code in place. For CSS I recommend Custom Code > Custom CSS or base.css. Let's make sure you understand and are setup properly before we really dive in. Go to Appearance > Themes and make sure the PlatformPro Base is what's activated. Thanks, Bryan Share this post Link to post Share on other sites
seppie 0 Report post Posted March 10, 2011 @Bryan, Thanks! I do have PlatformPro Base activated, and I definitely want to be able to upgrade without starting over (in fact, I just did -- love the typography options!) I have used the custom CSS section a bit already. But since this line of code is php, not CSS I got stuck...I also tried dropping the code into Custom Code > Header Scripts but that didn't work. What to do next? September Share this post Link to post Share on other sites
cmunns 16 Report post Posted March 10, 2011 Any hooks or PHP added in the Base theme should go into the functions.php file. What is the code snippet you are trying to use? Share this post Link to post Share on other sites
seppie 0 Report post Posted March 11, 2011 The code snippet I'm trying to use is: <?php if(function_exists('show_media_header')){ show_media_header(); } ?> This is supposed to go into the theme file that controls the header. @Adam, your response brings me right back to my original question: Where do I find functions.php? Share this post Link to post Share on other sites
djb21au 0 Report post Posted March 11, 2011 You can find functions.php via the Editor under Appearance.: Make sure 'Select Theme to Edit' (top right) is set to PlatformBase Otherwise, via FTP, it's in the folder wp-content/themes/platormbase Share this post Link to post Share on other sites