javigh123
Forum Replies Created
-
Forum: Networking WordPress
In reply to: 301 Redirects for URLs that don't existwell, i’m guessing blog URLs. this is the problem….my website is myghcstore.com and lets say you go to myghcstore.com/sgkjl (any random URL) it takes you to a page that says “this is an example of a wordpress blog etc…”
I don’t want this page to appear, I want it to redirect to the home page which the home page will redirect to another website. I only want the Sites that I create to be accessible such as myghcstore.com/john
Forum: Networking WordPress
In reply to: Add Multiple Pages on WP Multisite by defaultyea that’s what i’m afraid of, everytime i update its going to break….thanks for the tip.
Forum: Networking WordPress
In reply to: Add Multiple Pages on WP Multisite by defaultThanks, but my php skills are very limited. I wouldn’t know where to start but I might look into it. can’t learn without trying!
Forum: Networking WordPress
In reply to: Add Multiple Pages on WP Multisite by defaultPS. if you want to create static pages for each new site, you just have to edit the wp-admin/includes/upgrade.php file (in my case i needed to change different pages i created so i had to edit all 3 documents)
Go down to around line 255 and you will see a line that starts off $first_page = _(‘This is the first page’). Copy that line all the way down to the last line that starts off with $wpdb->insert…….
Paste what you copied below this line and you will have to change everything from $first_page to $second_pagereplace ‘This is the first page’ with whatever content you want. Every time you create a site, this is what you will get. Remember to leave the single quotes in place.
Forum: Networking WordPress
In reply to: Add Multiple Pages on WP Multisite by defaultok, i finally figured it out and this is what you have to do to add more default pages in the “options” section of multisites. I am running WP 3.0.1 on php5
open the following 3 files in your editor, I like using Zend because it notifies you when you have broken code.
root/wp-admin/ms-options.php
root/wp-admin/ms-edit.php
root/wp-admin/includes/upgrade.phpin ms-options.php go down to about line 220 and copy the <tr> code that creates the input box of the first page (about page). Now paste it right below the </tr> meaning it’s going to start a new table row. Change the variables from first_page to second_page (or whatever you want to, just remember to keep this consistent. throughout all 3 documents you are editing. Add as many of these as you like and change the variables of each.
Now on the ms-edit.php go down to around line 120 and you will see a line that starts off with $options = array. You will see a bunch of variables there, look for ‘first_page’, and add as many pages as you added in the ms-options.php file. for example, if you added 2 more pages you will add ‘second_page’, ‘third_page’, (or whatever you named them). Make sure there is a space between each.
Last file to edit is upgrade.php. Go down to around line 255 and you will see a line that starts off $first_page = _(‘This is the first page’). Copy that line all the way down to the last line that starts off with $wpdb->insert…….
Paste what you copied below this line and you will have to change everything from $first_page to $second_page (or whatever you named it) Remember everything has to be consistent or it will not work. One of those options is ‘post_title’ => _ (‘About’), this is where you change the title “About” of your first page. Add as many of these as you created in the ms-options.php fileThis is not hard at all to do, I have very basic php skill and I was able to figure it out. The hardest part is finding out which is the first document you need to edit and I did that for you. Happy php’n!
Forum: Networking WordPress
In reply to: Add Multiple Pages on WP Multisite by defaultDo i need to change anything specific on that file for it to read from ms-options.php?
I can get it to create new pages, that’s no problem, but i want to put content in the input box of the “options” in the super admin.
this is the second page i created:
// Health Product Kits Page
$second_page = __(‘This is the health product kits page’);
if ( is_multisite() )
$second_page = get_site_option( ‘second_page’, $second_page );
$second_post_guid = get_option(‘home’) . ‘/?page_id=3’;
$wpdb->insert( $wpdb->posts, array(
‘post_author’ => $user_id,
‘post_date’ => $now,
‘post_date_gmt’ => $now_gmt,
‘post_content’ => $second_page,
‘post_excerpt’ => ”,
‘post_title’ => __(‘Health Product Kits’),
/* translators: Default page slug */
‘post_name’ => _x(‘health product kits’, ‘Default page slug’),
‘post_modified’ => $now,
‘post_modified_gmt’ => $now_gmt,
‘guid’ => $second_post_guid,
‘post_type’ => ‘page’,
‘to_ping’ => ”,
‘pinged’ => ”,
‘post_content_filtered’ => ”
));
$wpdb->insert( $wpdb->postmeta, array( ‘post_id’ => 3, ‘meta_key’ => ‘_wp_page_template’, ‘meta_value’ => ‘default’ ) );That page will only display “This is the health product kits page” as if it wont go to the next line where the conditional satement tells it if its part of a multisite, display the variable that was inputed from the options page.
Forum: Networking WordPress
In reply to: Add Multiple Pages on WP Multisite by defaultNo, that doesn’t do what I’m looking for. Lets say for example that on my main site, https://www.mysite.com (that’s where the wordpress installation is located) i have 6 pages. Well, when I create a new site using multisite, i want those same pages to be created on the new site.
On the wp-admin/ms-options.php file I added new input fields for page 2 page 3 etc and on wp-admin/includes/upgrade.php I added new lines to create those pages. but when I enter what i want for page 2 page 3 etc in the options menu of multisites and I click the save button, that information is not being saved or displayed on the new site once it’s created.
Forum: Plugins
In reply to: [Plugin: SI CAPTCHA Anti-Spam] Where is the comment textarea?Ok, i figured out how to put the captcha image above the input field. Hit me up for the si-captcha.php file if anyone is looking for this.
Thanks guys, thats exactly what I did; changed those entries in phpmyadmin.
I figured it out, I had to update tho entries on the database in the wp-options table. Update the “Site URL” and the “Home” entries to the location of the testing blog.
Forum: Plugins
In reply to: [Plugin: SI CAPTCHA Anti-Spam] Where is the comment textarea?Has anyone had any luck rearranging the captcha image above the input field?