Digital Raindrops
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Split top menu into right and left.Use a custom menu and add “Css Classes”, create a menu Appearance > menu, add it to the primary location, then on one of the menu items, [ Screen Options ] check CSS Classes, try adding alignright to one of the menu items and see if it works.
Example of using menu Css Classes, you would add
alignright
to the menu item.I have just tested the theory, but the access li style is overloading the alignright, and you will have to use a child theme, then add
.alignright { float: right !important; }
Then add the class to the menu items!
HTH
David
Forum: Fixing WordPress
In reply to: Display Alt Text under a Post ThumbnailIt’s a typo
$thumb_id
has a value, and$thumbnail_id
has never been set!$thumb_id = get_post_thumbnail_id($post->id); //Uncomment to show the thumbnail alt field //$alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
Should be:
//Uncomment to show the thumbnail alt field //$alt = get_post_meta($thumb_id, '_wp_attachment_image_alt', true);
HTH
David
Forum: Themes and Templates
In reply to: trying to remove the search form in 2011 header sectionTry this, copy searchform.php to the child theme and empty it, if the child themes searchform.php over-rides the parents as it should, then that should deal with the search form.
it doesn’t free-up the right-hand space on the main horizontal nav bar
The default Twenty Eleven does not have the search in the navigation, it has it top right in the header, in the #branding, if you have added the search in the navigation from another tutorial, just reverse the changes?
Regards
David
Forum: Themes and Templates
In reply to: trying to remove the search form in 2011 header sectionHi,
You cannot do it with functions.php, only by editing header.php or using the style.css file.For other readers of this topic:
If you are using a child theme it is easy, just do the following, copy header.php from the parent theme, paste this to the child themes directory.Open the new header.php file in the child theme, lines 115 to 126 deal with the search box, remove or edit the layout code in this new file to suit your changes.
If the template file exists in the child theme then this will be loaded and not the parents.
As already said when the next update comes out you should check to see if there are any changes you need to add to your child theme.
style.css : stylesheet
Another option use the style.css for the search setting the height to zero, hide it, or send it off screen with right: 99999px; that should free up the space!.only-search, #branding #searchform { display: none; right: 99999px; }
HTH
David
Forum: Themes and Templates
In reply to: twenty ten child theme@mor10,
For anyone reading this topic wanting to use the solution, we should make things clearer, the code posted by esmi is correct but is only effective if it is wrapped in a function and called with the ‘after_setup_theme’ hook.Analysis:
WordPress loads the child themes functions.php first, so the header would be set first if the code was just in the functions.php as in esmi’s example.add_filter( 'twentyten_header_image_width', 'my_header_width' ); add_filter( 'twentyten_header_image_height', 'my_header_height' ); function my_header_width($width) { $width = 980; return $width; } function my_header_height($height) { $height = 224; return $height; }
WordPress will then run the twenty eleven parent themes functions.php, where this will set the filters back to 1000px x 288px
This is where the ‘after_setup_theme’ HOOK and ‘post_theme_setup’ functions are used, the childs functions.php is loaded, the parents.functions.php is loaded, the parents ‘after_setup_theme’ hooks are then run, where the header size is set, followed by the child themes functions.php where the filters are removed and re-set, with a ‘after_setup_theme’ hook!
A functions.php with esmi’s code, to change the header size will look something like this.
<?php /** * A functions.php to change the header size */ add_action( 'after_setup_theme', 'post_theme_setup' ); if ( !function_exists( 'post_theme_setup' ) ): function post_theme_setup() { add_filter( 'twentyten_header_image_width', 'my_header_width' ); add_filter( 'twentyten_header_image_height', 'my_header_height' ); function my_header_width($width) { $width = 980; return $width; } function my_header_height($height) { $height = 224; return $height; } } endif;
I hope this is clear to anyone reading this topic!
David
Hi,
You will need to create a template page for a “Page of Posts”, there are examples out there if you look on Google, but most are for a specific category so you will have to adapt one, here are mine for the twenty eleven theme.Why not upgrade to a twenty eleven child theme and add your changes, most examples now are for the twenty eleven theme?
HTH
David
But there is no such “Excerpt” window on the Edit Post pages on this site.
Go to Posts > Posts and edit a post.
At the top right you will see [ Screen Options ] click on this and a drop down area will show with check boxes, check the one for Excerpt
Have a read of this post as it looks at all options.
HTH
David
Forum: Themes and Templates
In reply to: Drop down menuHi,
As we do not know what theme you are using, we will give a general tip.If you are using pages then Admin > Pages > Pages, edit the pages and select the Parent Page from the dropdown to indent.
If your theme supports Custom Menus, Admin > Appearance > Menus, create a new menu add the items you want, indent (drag right to indent) the items and save the menu, assign the menu to a templte location on the left and save again.
HTH
David
Forum: Themes and Templates
In reply to: twenty ten child themeOk you did not wrap the code inside a function like above, the child themes function.php loads first, then the parent which would have changed things again.
add_action( 'after_setup_theme', 'post_theme_setup' ); if ( !function_exists( 'post_theme_setup' ) ): function post_theme_setup() { /* Code goes here! */ } endif;
By using the
after_theme_setup
hook the function will load last.UNTESTED other changes to your code as well, it is late in the UK:
https://pastebin.com/pFLUYq8JChild themes style.css
/* The main theme structure */ #access .menu-header, div.menu, #colophon, #branding, #main, #wrapper { width: 980px; } #access { width: 980px; } #access .menu-header, div.menu { width: 968px; }
HTH
David
Forum: Themes and Templates
In reply to: Need help with index pageBut apparently I can’t put a picture here!
There are image share websites where you can upload an image and just paste a link here, you cannot embed in the forum but you can link!
Post the style.css to https://pastebin.com
The structure looks fine to me, I stripped it down by div, could it be the twitter iframe?
General Observation!
Twitter code can be much lighter and you might want to wrap the social media in a div.Example:
For the twitter try:<?php /* Change 'twittername' for your twitter name */ ?> <?php $twitter = 'twittername'; ?> <div class="social-share"> <script type="text/javascript" src="https://tweetmeme.com/i/scripts/button.js"></script> <script type="text/javascript"> tweetmeme_source = <?php echo $twitter; ?>; tweetmeme_style = 'normal'; tweetmeme_service = 'bit.ly'; </script> </div>
stylesheet.css
.social-share { float: left; display: block; position: relative; overflow: hidden; max-width: 110px; z-index: 99; padding: 7px 0 7px 10px; text-align: center; }
Used in the sidebar widget here get all the code from here and look in /widgets/social-widget.php, other social code for google, facebook and linkedin, scripts loaded in wp-footer hook see functions.php
EDITED:
Sorry it was facebook!<?php $url=(!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; ?> <div class="social-share"> <!-- start www.websiteadministrator.com.au facebook like code--> <div id="FaceBookLikeButton"> <script type="text/javascript"> //<![CDATA[ var fb = document.createElement('fb:like'); fb.setAttribute("href",<?php echo '"' .$url .'" '; ?>); fb.setAttribute("layout","box_count"); fb.setAttribute("show_faces","false"); fb.setAttribute("width","60"); fb.setAttribute("font","arial"); document.getElementById("FaceBookLikeButton").appendChild(fb); //]]> </script> <script type="text/javascript">"https://connect.facebook.net/en_US/all.js#xfbml=1"</script> </div><!-- end www.websiteadministrator.com.au php facebook like code--> </div>
HTH
David
Forum: Themes and Templates
In reply to: twenty ten child theme@shepme,
Put functions.php and style.css up on https://pastebin.com, and paste the links back here, others might want to see if there is a problem, offer help, or learn from the replies.I will copy and test the code from the two pastebin files, and give a solution ??
This forum is about sharing the problems and the solutions, so others might find answers as well.
Regards
David
Forum: Themes and Templates
In reply to: twenty ten child themeHi,
I have added 7 Videos into a play list, bookmark the page and work through them, these are all for the twenty eleven theme!Make the images just over size, it could be that the servers see’s them as 979px, make them a bit bigger and crop them.
It could be better to switch to the twenty eleven theme and practice on that theme ??
If it still fails paste the functions.php up to https://pastebin.com so we can have a look.
HTH
David
David
Forum: Themes and Templates
In reply to: twenty ten child themeCan you please advise exactly were I place this inside of the header.php.
@sheme and @muchogaucho
If you have been adding this code in the header.php then you are off track, the code goes in the child theme, if you do not have a functions.php then you must create one and add the code!It could be your lucky day, I posted a Video on YouTube yesterday that does most of what you want it adjusts the header height, removed the default headers,however adjusting the width means also adjusting the styles.css
Here is the YouTube Video
There is a whole series of posts (Over 20 Sessions) on my website for beginners, with the twenty ten theme, these are now old but they might help you get a base understanding!
The posts have download child themes, there is also a downloads page, and it is all free!
Please do watch the Video and take in the instruction, that is the way you will learn, rather than just downloading the child themes.
HTH
David
Forum: Themes and Templates
In reply to: May I upload a free Genesis Child Theme?There is a difference with the plugins and themes here, anyone can write a plugin, and upload it with little or no checks being made!
The themes here are the “WordPress Brand” at a quality the public see and expect, there are strict controls by an application and acceptance, where there are suitability rules and code standards.
Example is the Artisteer theme generation product, the themes do not meet the WordPress theme coding standards so they do not get a look in!
They do work with WordPress, this does not mean they are bad or sub standard just not coded the way that WordPress want them to be coded, they also might be missing a few of the requirements.
If WordPress applied the same rules to the plugins we would likely loose 80% of them, so it might be better to create a plugin that generates the child themes.
Hope you don’t mind my comments, that is just the way it is, I added a theme, it was accepted on the seventh attempt, and it was the twenty ten theme at the core of it.
Even after acceptance if you change something it has to be re-submitted, and it can fail on something unrelated to the change!
Interesting Topic!
David
Forum: Themes and Templates
In reply to: May I upload a free Genesis Child Theme?Child themes should be coming the theme directory in just a couple of weeks
No child themes not even for the bundled WordPress Twenty Eleven theme as yet!
That would be nice, I hope that the WordPress team start with an empty twenty eleven child theme that can be installed from Add New, it would help with so many topics here!
Just think!
“Do not modify the default theme, go to Appearance > Themes > Add New, enter twenty eleven child in the search, install the theme and activate it, when you have done this we can help you!”
David ??