Digital Raindrops
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Changing the header size of twenty eleven@ov3rfly,
I have updated the download with this code and added a credit link to your WordPress profile page!Regards
David
Forum: Themes and Templates
In reply to: How to remove default image formatting on home pageWe will need a link to a website, or if the theme is a free one a link to the themes download page!
David
Forum: Themes and Templates
In reply to: Changing the header size of twenty elevenHi Ty,
I have zipped up a child theme for download, it is one I have been using to test different wide theme functions, the functions.php code snippets you can copy out the relevent lines.You can also upload, activate and test the child theme, use the theme or any of the code, you should not get any errors on activating the theme.
NOTE: If you do get any errors what are the WordPress and PHP versions!
functions.php
There is also a function that will look in the child theme’s folder for /images/headers/ and any *.jpg or *.png files that are post fixed-thumbnail.You will see I have included three sample headers that the function will register automatically on load, to use this in you own theme create the header to your dimensions, then resize and postfix with
-thumbnailat 230px to 400px wideAny headers with thumbnails in the folder will be selectable from Appearance > Headers
Another bit of code to load a custom-style.css file so user changes can be done ‘non-destructive’ without editing the style.css
HTH
David
Forum: Themes and Templates
In reply to: Changing the header size of twenty elevenIt worked fine for me, 1140 width!
functions.php
http://pastebin.com/46Q6JmNPstyle.css added!
/* =Make our page 140px wider maximum width 1140 pixels -------------------------------------------------------------- */ #page { max-width: 1140px; } .featured-posts, #ie7 article.intro { max-width: 1140px; }HTH
David
Forum: Fixing WordPress
In reply to: Want Primary Navigation to Change on Registered user Only PagesHi vtxyzzy,
More than one way to skin a cat, I thought it was a new and active topic I was answering with another solution, but it was historic ;(Theme Location is just another option, and the code is very tidy as the menu can be called whatever the website admin wants, I never hard code values myself, menu => ‘members’ is only ok when the admin knows what to call the menu, however if the website admin changes, or the the menu was deleted the members menu feature could then be lost!
To me the ‘Theme Location’ solution is transportable across themes, if the theme location menu does not exists it will fall through to get_pages, it might help others looking for the same solution, this is not a critique of your solution, just my own opinion!
David
Forum: Fixing WordPress
In reply to: Want Primary Navigation to Change on Registered user Only PagesYou are missing the Theme Location for the members, add a new location and create a members menu assign the menu to the new theme location!
In functions.php add the new location!
'members-menu' => __('Members Menu', 'responsive'),In header.php based on twenty eleven child theme, make the location conditional!
UNTESTED:<?php $location = is_user_logged_in() ? 'members-menu' : 'top-menu'; ?> <?php wp_nav_menu( array( 'theme_location' => $location ) ); ?>HTH
David
EDIT: GRRRRR! another old topic posted an answer to, at least this one is not 9 months old!
Forum: Themes and Templates
In reply to: Changing the header size of twenty eleven@ov3rfly
Thanks for that pointer I will use it in a post I am writing on making a wide twenty eleven (1140px) child theme.Regards
David
The new category is there alright but it appears as a new top level category i.e. it is not indented under its parent category.
The answer is as SwansonPhotos has already stated, as you add menu items these are not indented by WordPress you have to drag them slightly right until they indent to create the hierarchy, any categories that have no posts will not show!
Remember you can drag a menu item slightly to the right of the menu item above it to create a hierarchy (parent/child) relationship in the menu.
HTH
David
Forum: Themes and Templates
In reply to: Custom Post Type single pageNot sure what you mean, editable home page?, a better description of what you want to achive might help.
1. just use a normal page and set this in Settings > Reading?
2. different single page layout for a post type?
3. save page.php as home.php and add in a post query to return only the first custom post type?HTH
David
Forum: Themes and Templates
In reply to: Changing the header size of twenty elevenNo problem, it is one thing that many do not think about, that the original images are not resized.
Can you mark this one as resolved please.
David
Forum: Themes and Templates
In reply to: Changing the header size of twenty elevenIt will work, you have to upload the NEW headers, this will bring up the crop function!
The original ones are already to big, WordPress will not resize these!
HTH
David
Forum: Themes and Templates
In reply to: Changing the header size of twenty elevenHi,
You need to change the sizes in a ‘post_theme_setup’ function, check out this topic from last week!
At the moment the child theme sets the sizes and the parent re-sets them, with an action running a post_theme_setup function, this runs after the child and parents functions.php have been run!
This child themes function.php code sets the new sizes and removes the default headers, so you would upload and crop the new headers!
HTH
David
Forum: Themes and Templates
In reply to: Codex tea leaves. 2011 theme.@srijan Mitra
Why are you answering topics nine months later, I have just wasted time replying to this topics, which was likely resolved months ago!David π
Forum: Themes and Templates
In reply to: Codex tea leaves. 2011 theme.With regards to the call to the_post();.. Why do I need to iterate for the loop on a page that is not supposed to really be using any posts?
Posts, pages, custom posts, and image details are all stored in the same table (wp-post) and a query or filter is created to return a dataset, either a single page or a set of posts, it is normal for database queries to work like this!, as there is only one page (wp-post) in the filter the loop is used to find the first, in posts it finds the first then next until the end of the dataset.
With regards to get_template_part… Can you really get part of the page template from page.php? Where is ‘content’ defined?
Template parts are blocks of code that you want included in the template, it is an advanced wrapper for the include statement, it takes two arguments, so get_template_part(‘content’,’category’) first looks for a file called content-category.php, if it can not find the file then content.php.
Where is the code located that is fetched by get_template_part above? Those are my questions for the time being.
Have a look in the twenty eleven theme at all the files starting “content-“, like content-page.php used in the page.php template.
HTH
David
Forum: Themes and Templates
In reply to: [F8 Lite] [Theme: F8 Lite] fatal error when creating child themeThe problem is in the parent theme functions.php as you are using a child theme it is looking for two files in the child themes folder.
// Load theme options require_once ( get_stylesheet_directory() . '/theme-options.php' ); // Load Post Images require_once ( get_stylesheet_directory() . '/images.php');“Contact the author to get the theme updated”, as this should be
get_template_directory(), for now you could copy theme-options.php and images.php from the parent to the child theme’s folder.HTH
David