Forum Replies Created
-
In reply to: Point a custom php page template to use/inherit OneColumn-No SideBar format???
January 2, 2012 at 10:58 pm #21885Hi again, sorry the first method didn’t work for you. Whilst thinking about what was going on with the CSS I came up with a much simpler way of doing this: filtering the_content when on your links page:
<?php
// add the filter
add_filter ('the_content', 'jl_add_links');
function jl_add_links ($content) {
if (!(is_page('list-links'))) return $content;
$content .= wp_list_bookmarks('category_before=&category_after=&title_before=<h3>&title_after=</h3>&show_images=0;&show_images=1;&show_description=1&echo=0');
return $content;
}
?>This can go in your functions.php then all you have to do is create a page with the slug list-links and set the template to one-column, no other changes required.
Note: this time I tested this before writing!
In answer to your second original question a line break could be added by putting
<br />
after the</h3>
in the title_after attribute.In reply to: Point a custom php page template to use/inherit OneColumn-No SideBar format???
December 30, 2011 at 3:19 pm #21880I think you are very close to achieving what you want to do.
0) make sure you have not made any changes to loop.php and rename your loop-single.php to loop-links.php
1) copy
template-onecolumn.php
from graphene to you child theme.2) rename this to
template-links.php
or similar & change the title in the header3) change
get_template_part(...
toget_template_part('loop','links');
4) select this template in a page and you should be good to go!
I have done similar at http://www.wmrt.org.uk/advice/accident-black-spots/scafell-broad-stand/ and http://www.wmrt.org.uk/gallery/
Hope this helps
Jon
I would recommend using a plugin that loads twitter content using javascript that is called using the window.onload. This way only a blank space is created when the page loads and the content is added dynamically later. I’ll admit I have not looked at Graphene’s widget to check it does not already do this but if you are saying that it delays page loading I expect it does not. If you look at http://www.wmrt.org.uk the google news is loaded after the rest of the content using this method.
Cheers
Jon
The reason this is not working by attaching it to any of the hooks in the theme is that the code above is only executed when a hook called
gform_post_submission
is fired (theadd_action()
call at the end). I suspect that this happens before the graphene hooks are fired so you are attaching your code after the event that is supposed to trigger it.It would be possible to rewrite the above function to work but the problem is that it is passed two parameters, one of which
$entry
contains all the data to put into your form. Somewhere in your themedo_action ('gform_post_submission'...)
is being called which currently generates the form. I don’t think the graphene hooks can be passed parameter. I would suggest unless you know where the data is comming from you leave your code alone.If it is being hooked successfully from functions.php there seems little point making it theme dependent.
I hope this helps
Jon
Looks fine to me now, (using Chrome) I assume you’ve sorted it!
Jon
My site also does this in Chrome. To be honest I’ve got used to it.
The
_e()
allows for the phrase to be translated, without editing the theme files. I would recommend doing some research into how to apply a translation to the graphene theme.Cheers
Jon
my suggestion is to create a separate sprite (stored in the child theme folder) for all your changed images and reference it from your child theme stylesheet. This does not get overwritten by an update.
Jon
or try
<?php
and?>
Sorry I cut and pasted the above from the plugin, it does not include the
<?php
tag before the code and?>
after it.That may help
Jon