dgcov
Forum Replies Created
-
Forum: Hacks
In reply to: Invoking a callback to display metaboxesOkay,
I’ve got it.
When I register my post type
register_post_type( 'team_list_event', $args );
, I have specified the post type id to be “team_list_event”.When I add my metaboxes
add_meta_box('team_list_event','Team Event fields','team_event_show_box', 'post');
, instead of using “post” as the fourth parameter, I should use my newly-registered post type, “team_list_event”.
add_meta_box('team_list_event','Team Event fields','team_event_show_box', 'team_list_event');
Simples. ??
Forum: Plugins
In reply to: [Simplr Registration Form Plus+] New users cannot log inWell, changing it to ‘No’ works.
??
Forum: Plugins
In reply to: [Simplr Registration Form Plus+] New users cannot log inYes.
Should it be set to No?
Forum: Fixing WordPress
In reply to: Security CheckThanks.
Funny how a simple suggestion ends up pointing in the right direction!
I don’t have ssh access to the server, so I duplicated the site locally so that I could scan for the phrase as you suggested.
dave@Threepwood:/var/www/wordpress/wp-content$ grep -iR "Security check" *
produced no results, but when I looked at the page in the browser:
Parse error: syntax error, unexpected ‘$form’ (T_VARIABLE) in /var/www/wordpress/wp-content/plugins/chronoforms/admin/chronoforms/actions/custom_code/custom_code.php(20) : eval()’d code on line 4
From which I found a line in my code which didn’t have the line-ending semi-colon.
Forum: Plugins
In reply to: [Simplr Registration Form Plus+] How do I submit the form from javascriptThanks for the assistance.
I was using my own validation routine (and captcha functions) which I have now abandoned and it’s working fine. It must’ve been something in my code.
If you are still ineterested, the url is haroldwoodrc.co.uk
Forum: Plugins
In reply to: [Simplr Registration Form Plus+] How do I submit the form from javascriptYou mean the Firefox firebug console?
Only this:
“Error: fbcdn-profile-a.akamaihd.net : server does not support RFC 5746, see CVE-2009-3555”
but I suspect that is from my Facebook plugin.
I’m getting a similar error.
It’s intermittent and some users are affected, while others are not.
When it occurs, then the array $available_methods is empty.
If I place
<?php print_r($available_methods ); die;?>
in WooCommerce/Templates/cart-shipping.php at around line 21 it prints out ‘Array()’Disabling and removing weight-based-shipping cures it, but this is obviously not desirable.
Forum: Fixing WordPress
In reply to: Form action to access a file in theme.Thanks.
I realise that this is a horrible kludge, but I’ve generated the page in my functions.php.
$pages=get_pages(); $orderformpage=''; foreach($pages as $page) { $name=$page->post_name; if ($name=='orderformpage') { $orderformpage=$name; } } if($orderformpage==''){ wp_insert_post( array( 'post_name' => 'orderformpage', 'post_title' => 'Order Form', 'post_status' => 'publish', 'post_type' => 'page', 'page_template' => 'page-orderform.php' ) ); }
… which sets up the page.
echo '<form name="orderform" action="'.get_site_url().'/orderform">';
Now I can put my form-handling into page-orderform.php
As I say, I’m sure there is a better way of doing this, but, in the absence of any direction, this will have to do.
Forum: Fixing WordPress
In reply to: Form action to access a file in theme.Indeed, if I want my theme to be used and adopted by others then I’d program it to be less specific and more universally generic. However, I’m just looking for a solution for a very specific problem.
To be honest, I’m not really interested in a slanging match with you and I haven’t come here to be lectured on my ignorance.
If you can suggest a way of achieving what I’m after, please do so.
Thank you.
Dave
Forum: Fixing WordPress
In reply to: Form action to access a file in theme.Except there IS a method of calling the file directly, as I’ve already alluded.
Namely, you create a template file with the name of the stub you wish to use with “page-” prepended and then build a page in the backend that uses that stub.
If it can’t be done, then I’ll probably create the page in my functions.php and then filter out the stub so that it doesn’t display the menu item.
Hopefully there’s a simpler solution.
Forum: Fixing WordPress
In reply to: How do I set a page as the front page?Okay; this is clearly what I was missing.
if (have_posts()) { while (have_posts()) { the_post(); the_content(); } }
Produces the required output.
Hope this helps someone.
Forum: Fixing WordPress
In reply to: How do I set a page as the front page?if (have_posts()) { while (have_posts()) { $post=the_post(); if(empty($post)){ echo "Post is empty"; } } }
Prints “Post is empty”.
Forum: Fixing WordPress
In reply to: How do I set a page as the front page?I don’t know why you replied if all you were going to do is say “RTFM”.
If anyone else has this issue, you have to enable the option in the theme.
Appearance->Customise->Static Front Page.
Only after that do the radio buttons appear under under Settings->Reading.
However, my Front page still doesn’t show up.
if (have_posts()) { while (have_posts()) { echo 'Posts found'; the_post(); } } else { echo 'None found.'; }
returns “Posts found”.
The page is not displayed.
Forum: Fixing WordPress
In reply to: How do I set a page as the front page?Settings->Reading
Reading Settings
Blog pages show at most 10 posts
Syndication feeds show the most recent 10 items
For each article in a feed, show
Full text
Summary
Search Engine Visibility Discourage search engines from indexing this siteForum: Fixing WordPress
In reply to: How do I set a page as the front page?Um.
I have already read that.
I have also read the links on pages, and the links on the differences between posts and pages.
I realise there’s a difference.
Where do I find the radio buttons to which that link refers?
https://codex.www.ads-software.com/images/b/b2/static_front_page_setting.png