Search Results for 'code'
-
Search Results
-
I am posting a topic using this form, which specifies to post to post_parent ID 599.
Everything functions ok, but the topic will not show up in the frontend under the specified forum category.
It does show after posted, but in the backend. What am i missing to have it show up under the forum?
<?php /* Template Name: Question Form */ get_header(); if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == "new_post") { // Do some minor form validation to make sure there is content if (isset ($_POST['title'])) { $title = $_POST['title']; } else { echo 'Please enter a title'; } if (isset ($_POST['description'])) { $description = $_POST['description']; } else { echo 'Please enter the content'; } $tags = $_POST['post_tags']; // Add the content of the form to $post as an array $new_post = array( 'post_title' => $title, 'post_content' => $description, 'post_category' => array($_POST['cat']), // Usable for custom taxonomies too 'post_parent' => 599, // Forum ID to be posted to 'post_status' => 'publish', // Choose: publish, preview, future, draft, etc. 'post_type' => 'topic' //'post',page' or use a custom post type if you want to ); //save the new post $pid = wp_insert_post($new_post); wp_redirect(get_permalink($pid)); exit; //insert taxonomies } ?> <div id="wrap"> <div id="header"> <?php get_template_part('logo'); get_template_part('nav'); ?> </div> <div id="content"> <div id="main"> <?php get_template_part('searches'); ?> <div class="single-post-item"> <h1>Form Test</h1> <div class="post-meta">Fill out the fields below, all of them are required!</div> <div class="inner-content"> <!-- New Post Form --> <div id="postbox"> <form id="new_post" name="new_post" method="post" action=""> <!-- post name --> <p><label for="title">Title</label><br /> <input type="text" id="title" value="" tabindex="1" size="20" name="title" /> </p> <!-- post Content --> <p><label for="description">Content</label><br /> <textarea id="description" tabindex="4" name="description" cols="50" rows="6"></textarea> </p> <p align="right"><input type="submit" value="Publish" tabindex="6" id="submit" name="submit" /></p> <input type="hidden" name="action" value="new_post" /> <?php wp_nonce_field( 'new-post' ); ?> </form> </div> </div> </div> </div> <?php get_sidebar(); ?> </div> </div> <?php get_footer(); ?>I am getting a 404 error when I navigate to a topic like this one
https://www.geistinteractive.com/support/topic/barcode-creator-1/barcode-creator-v1-0-released
I have reset permalinks many many times to no avail.
Any ideas?
Thanks
Todd
Hi,
Here is what I see using codestyling localisation :
Loading Issue: Author is using load_textdomain instead of load_plugin_textdomain function. This may break behavior of WordPress, because some filters and actions won’t be executed anymore. Please contact the Author about that.
Thanks.
Hi,
In our site,
Topics with the status – pending are counted in topic summary text but not listed in topic list(as its pending,)
Topic count is stored in table namewp_postmetawith meta-key – _bbp_topic_count.
_bbp_topic_count is count of all topics including ‘pending’ topic.How can I get count of topics with status ‘open’ in my summary?
We are using bbpress version 2.5.3 and wordpress 3.8.1
Topic: List of moderators?
I would like to display a list of all the moderators, to make it easier for the forum users to know who to contact in case of problems.
Is there a shortcode or widget or something for this?