Mat Lipe
Forum Replies Created
-
I just realized the example I gave you will replace all the text. Try this instead.
function wp_new_content($content) {
echo $content.”my custom text”;
}
add_action(‘the_content’, ‘wp_new_content’);If you would like your text to display after the content you will want to use the add_action functions instead of add_filter. e.g.
function wp_new_content() {
echo “my custom text”;
}
add_action(‘the_content’, ‘wp_new_content’);Give that a try.
Thank you for the feedback toyshot.
I agree it could probably use some default CSS. I gave each level (at least three) different classnames but at the least it could probably use some default margins, boldness etc. Also having the ability to choose how many levels it goes down would be a nice addition. I think I’ll have to add that on my next version.
The way it currently works now is it shows the top level parent and 1 level of children if you are on the top parent page. If you are on any of the child pages and they have children, it will display all the children of that child as well as many levels deep that exist. Does that make sense?
I welcome suggestions and am happy to add new cool stuff with each version.
Forum: Installing WordPress
In reply to: Database not working correctlyI have seen it before where the user is set up for the database, but the user has not been given the proper permissions. To troubleshoot this, I would give the user you are using for wordpress all permissions and see if that makes a difference.
Forum: Themes and Templates
In reply to: Twenty Eleven theme modificationThere are a few ways of doing this, The easiest would be using css.
Find your the twentyeleven’s theme css file. Probably located at /wp-content/themes/twentyeleven/style.css
Add the following classes anywhere in the file. I would add them near the top right about the “html, body, div, span, applet, object, iframe,” line.
/* Custom logo */
h1#site-title, h2#site-description {
text-indent: -99999px;
}body #branding hgroup{
margin-top: 20px;
background: url(/wp-content/themes/twentyeleven/images/logo.png) left center no-repeat;
margin-bottom: -20px;
}/*end custom logo */
New if you name your logo logo.png, and put it in the /wp-content/themes/twentyeleven/images folder, it will show up on the site right where the text used to be.
If you are concerned with not wanted to edit the twenty eleven theme you may also do this with a child theme.
For that you will want to create a folder in the /wp-content/themes folder and name it whatever you want. twentyeleven-child is not a bad choice.
Copy and paste the style.css file from the twentyeleven theme into this new folder.
Delete the top section between the /* and the ———————- */ and replace it with the following code.
/*
Theme Name: Twenty Eleven Child
Theme URI: http: //example.com/
Description: Child theme for the Twenty Eleven theme
Author: Your name here
Author URI: http: //example.com/about/
Template: twentyeleven
Version: 0.1.0
*/You may edit this information to match yourself.
Now add the custom classes to this new file like I mentioned above.
Log into your site and go to Appearance=>Themes. You will see one named however you named the one above. Click on activate. Your site will now be running your child theme and be safe from upgrades and such.
Forum: Installing WordPress
In reply to: Problem Installing after file uploadIt looks like you may be getting some interference from the default files the web host put in your public-html. That is just a guess based one custom error markup and 404 redirect and such.
I would try completely cleaning out the public-html folder and then uploading your wordpress files into the clean directory. (If you haven’t tried this already).
Forum: Installing WordPress
In reply to: Database not working correctlyWhat is the error you are getting? Sound like it might not be the default “Error Connecting To Database” error that wordpress gives you when your config file is wrong. Also, is this a fresh install of wordpress, or a transfer of an existing site?
Forum: Fixing WordPress
In reply to: How to create login ,registration, profile in wordpress siteHello manishegroup,
Which part of wordpress are you trying to create a login for?