Jon Lynch

Member

Forum Replies Created

  • Hi 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.

    I 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 header

    3) change get_template_part(... to get_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

    In reply to: How to make the Twitter Widget load last

    #20363

    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

    In reply to: Which Action Hook To Use

    #20207

    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 (the add_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 theme do_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

    In reply to: Showing Off Wasdale Mountain Rescue

    #16722

    Looks fine to me now, (using Chrome) I assume you’ve sorted it!

    Jon

    In reply to: Slider "catches up"

    #18734

    My site also does this in Chrome. To be honest I’ve got used to it.

    In reply to: block button problem

    #18153

    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

    In reply to: Trying out child theme, need some help please

    #17988

    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

    In reply to: White bar across the page, and problem with pages!

    #17973

    or try <?php and ?>

    In reply to: Showing Off Wasdale Mountain Rescue

    #16718

    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

Viewing 10 posts - 1 through 10 (of 45 total)