geezerd
Forum Replies Created
-
Forum: Themes and Templates
In reply to: My Post Won't Publish On My BlogWhat code are you talking about? No one has asked you to do anything with code. And if you don’t want to even try what anyone suggests, WordPress probably isn’t for you.
I suggested activating the Twenty Ten theme and seeing if that changes anything, but you won’t even do that. 3 clicks, and you won’t do it.
So don’t expect anyone to help you if you’re just going to be an ass. I’m certainly not going to. You’re not paying me anything, and no one on here is getting paid anything. It’s FREE software, supported by kind people willing to help others. So coming into the forums with an attitude gets you NOTHING.
LATER. MUCH.
Forum: Themes and Templates
In reply to: My Post Won't Publish On My BlogSwitch themes. Activate Twenty Ten. You can just switch back after, it doesn’t delete the theme.
Appearance > ThemesLol, OK, I’m bored, so I looked for an EXACT resolution to your question “Is there a way to set this randomly, so that the title bg image for each post is chosen from one of, say, five choices.”
First, install this plugin and set it up per the instructions (it will make a link at the bottom of Settings on the dashboard).
Then edit the file randomImage.php, replacing this line (at the end)
echo '<img src="'.$filename.'" title="'.substr($image_filename,0,-4).'" alt="'.substr($image_filename,0,-4).'" height="'.$physHeight.'" width="'.$physWidth.'"/>';
with this:
echo ''.$filename.'';
Then do something like this in the loop:
<h2 class="post-title" style="background:url(<?php if (function_exists('generateRandomImgTag')) { generateRandomImgTag(); } ?>) no-repeat;"> title stuff </h2>
Of course, you’ll need to set up some other php stuff to make it appear in certain posts, like the first post, or just with certain categories or tags, but, like I said, I’m a newb, if else stuff baffles me.
I figured it out, with some help from HERE
Inside the loop:<?php $bg_image = extract_post_thumb( get_the_post_thumbnail() ); ?> <?php if ($bg_image != '') { ?> <h2 class="title-with-bg" style="background: url( <?php echo $bg_image;?> ) no-repeat top left;"> <?php }else{ ?> <h2 class="title-no-bg"> <?php } ?> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themename' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a> </h2>
https://wpgym.com/using-wordpress-thumbnails-as-a-css-background/
That works, but I have a problem with it, in that if you want to have posts WITHOUT a background, those posts would need to have a different width, height and padding, so a php if else statement would be needed, and I’m a newbie to php, so I don’t know how to do it.
And in case you get stuck trying to figure out what that site means, here it is in a nutshell:
This goes ABOVE the loop:
<?php function wpgym_extract_post_thumb( $str ){ $matches = array(); $pattern = '/src=[\'"]?([^\'" >]+)[\'" >]/'; $match = preg_match( $pattern, $str, $matches ); return($matches[1]); } ?>
And this goes INSIDE the loop (my edits, to make it a title background, tested, it works):
<?php $bg_image = extract_post_thumb( get_the_post_thumbnail() ); ?> <h2 class="post-with-bg" style="background: url( <?php echo $bg_image;?> ) no-repeat top left;"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themename' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
It would need an if else to change the h2’s “class=”post-with-bg”” to “class=”post-no-bg”” if it doesn’t find a post thumbnail image.
Forum: Themes and Templates
In reply to: Post thumbnail as backgroundAny chance you could post the code needed to use the post thumbnail image as a background image for the TITLE of the post? The H2, or maybe better if it was the background for the ‘a’ link for the title H2?
Thanks!Forum: Fixing WordPress
In reply to: More tag not working in custom page templateOn https://codex.www.ads-software.com/Customizing_the_Read_More
Scroll down to: “How to use Read More in Pages” almost at the bottom.We’re “turning on” the more tag for Pages.
Forum: Fixing WordPress
In reply to: Need help with if is page and sticky post WP_QueryCan anyone help me on this?
Forum: Fixing WordPress
In reply to: One or 2 sentences in Russian on my blogNope.
And I meant to type “not have to use an IMAGE for it” in that last sentence.
Forum: Fixing WordPress
In reply to: Not able to get 2nd blog to format same as first blogMulti-site install?
Forum: Fixing WordPress
In reply to: Not able to get 2nd blog to format same as first blogDon’t use 2 blog installs, just use Multi-site
Forum: Fixing WordPress
In reply to: Line of text on login page, and change url of log in imageHere is how I am doing it now, hacking into the WordPress files, which is never good:
<body class="login"> <?php if ( !is_multisite() ) { ?> <div id="login"><h1><a href="<?php echo apply_filters('login_headerurl', 'https://www.ads-software.com/'); ?>" title="<?php echo apply_filters('login_headertitle', __('Home')); ?>"><?php bloginfo('name'); ?></a></h1> <p style="text-align:center;"><strong>Members Only area</strong></p> <?php } else { ?> <div id="login"><h1><a href="<?php echo apply_filters('login_headerurl', network_home_url() ); ?>" title="<?php echo apply_filters('login_headertitle', $current_site->site_name ); ?>"><span class="hide"><?php bloginfo('name'); ?></span></a></h1> <?php }
Which really should not even work, since I put my paragraph inside the ‘php if ( !is_multisite()’ part, and I’m not using multisite. It should only show if it were in the next part, the ‘php else’ there after it, right?
Forum: Fixing WordPress
In reply to: Remove some profile fieldsHmm… I dunno what to tell you, I just tried it on 3 different sites, it worked fine on all.
It doesn’t remove:
Email
Website
About Yourself (Biographical Info)Those are still showing. Sites all up and crankin’.
I myself would also like to know how to add new uneditable/non editable fields. Ones that subscribers can’t change, but can see.
Forum: Fixing WordPress
In reply to: Remove some profile fieldsI can see your point, I got a bit off subject, but since ipublicus’ code doesn’t work in 3.0, I offered the only thing I found that worked.
Simply leave the array empty if you want to just remove and not add:function extended_contact_info($user_contactmethods) { $user_contactmethods = array(); return $user_contactmethods; } add_filter('user_contactmethods', 'extended_contact_info');
And, no “I” did nothing new, since I stated I found the code while web searching.
So now you know what 2 cents is worth. Not much.
Forum: Fixing WordPress
In reply to: Center Blog In 1024×768custom.css?063010-31948
https://chipur.com/wp-content/themes/thesis_17/custom/custom.css?063010-31948
.custom #header #logo a { display:block; width:1300px; height:240px; background:url(https://i635.photobucket.com/albums/uu80/panicattackology/chipurheader0619104.jpg) left no-repeat; outline:none; color: #000000; text-indent: -9999px; padding-top: 0em; padding-right: 0em; padding-bottom: 0em; padding-left: 0em; border-top: 0em; border-right: 0em; border-bottom: 0em; border-left: 0em; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; }
The link’s width is 1300px;