Odai Athamneh
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How do I create a posting area BackgroundEach post in WordPress can have a “Featured Image“, chosen by the author while writing the post. It’s up to the theme how to use this image – some ignore it, some use it as a banner at the top of the page, and some use it as a background for the page.
Adding this functionality to an existing theme (using a Child Theme of course) shouldn’t be too hard if you know basic PHP. On second thought, this wouldn’t need too much additional CSS, since it would be written for each post as requested.
Forum: Plugins
In reply to: custom permalinks/URIsI see. That is challenging. In my limited experience WordPress’s permalink behavior, it can be hard to manage.
Could you use the PHP
$_SERVER['REQUEST_URI']
variable to get the request URL, parse it in your function, and use that to formulate the search request? Kind of duplicates what WP already does, but you’d have more control (you’d want to check if$wp_rewrite
is enabled first, of course).I also downloaded the plugin Nice Search and read through the code (also see Custom Search URL, which is an extension of the former). Maybe worth looking at.
Forum: Fixing WordPress
In reply to: Customize RSS widgetFree_Amy,
You’re right, my sleepy brain completely overlooked that last night. Fortunately, the plugin isolates the date text in a
<span>
element. Here’s the HTML code, copied from your page:<span class="rss-date">November 1, 2013</span>
Since the plugin author has so kindly given the date an
rss-date
class, we just have to add the following CSS somewhere:.rss-date { font-style: italic; }
Hope this helps!
Forum: Themes and Templates
In reply to: Updating a site that did not use Child ThemeKind of. Read the Child Themes page in the Codex, it’s this specific line in
style.css
that indicates a child theme:/* Theme Name: Twenty Ten Child Template: twentyten */ @import url("../twentyten/style.css");
The Theme Name is irrelevant but required, the Template and import create a Child Theme. That should work, but obviously create a backup of the theme to be safe.
Another problem is that while this will technically be a Child Theme, it will really just be a clone of the 3.5.1 version of the theme – all the buggy and vulnerable code will be in the Child Theme, so it’s like you never upgraded at all.
What I would do is create a test site somewhere, install the theme as a Child, and whittle away everything that isn’t a modification. This will take a bit of work, but I can almost guarantee that most of the mods are in
style.css
andheader.php
. This is really the only secure option, short of using a new theme.Forum: Themes and Templates
In reply to: Editing the Search WidgetHey kiekelly,
Check out this page. When the search form is requested via PHP, WordPress checks the active theme for a
searchform.php
file and displays the contents of it. Failing that, it uses it’s built-in form:<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> <div><label class="screen-reader-text" for="s">Search for:</label> <input type="text" value="" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form>
So in your active theme, create a
searchform.php
file and put this code inside of it:<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> <div><label class="screen-reader-text" for="s">Search for:</label> <input type="text" value="" placeholder="Search Site" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form>
And you should be good to go. Let me know how it goes!
Forum: Everything else WordPress
In reply to: Fitness DiaryThis is very possible within WordPress. There are a couple ways, both based around the idea of Roles and Capabilities.
One way would be to set-up a WordPress Multi-Site installation, with each client getting their own blog, which they would be an Author on (and no other blogs). The trainer would be an Editor or Admin on every blog, allowing them to see and comment on all blogs in the network. Then use a plugin like Private Only to keep the blogs private and members-only.
Another way would require a bit more coding ability: Create a script on a single blog, which runs before any page is loaded. If the logged-in user requesting the page is the fitness trainer OR the author of the post, the post is loaded. If the requester is not the trainer, author, or not logged in, they are given an error message or maybe redirected.
Hope this helps, feel free to reply if you’re still confused.
Forum: Fixing WordPress
In reply to: Which 2 files do I edit?Hey Sick Squirrel,
Check out the Template Hierarchy, while themes can have a number of files like tag.php and single.php for specific pages, the only required files are index.php and style.css, so you probably won’t find all of those files.
Also check out this Codex article on how the WordPress loop (which creates the posts) works.
The “Read more” text is based on what’s between the
()
in<?php the_content(); ?>
– since nothing is specified in your theme, I’m guessing WordPress falls back on it’s default “Read more” message, so go ahead and insert your own message in there, like so:<?php the_content('Read the rest of this entry »'); ?>
To change the Next/Previous links, you’ll need to find and modify this code:
<?php previous_posts_link('« Previous Entries') ?><?php next_posts_link('Next Entries »','') ?>
Hope this helps. Let me know if anything is confusing.
Forum: Fixing WordPress
In reply to: How do I create a posting area BackgroundHey kanobee,
Are you wanting to apply a different background to each individual page? If so, you will have to specify CSS for each page, although some themes do allow you to do this from within WordPress (still lots of CSS code, but saves time).
Or are you just asking how to specify a CSS background? If so, it’s generally better to apply the background code to the
body
element.Forum: Fixing WordPress
In reply to: Customize RSS widgetHey Free_Amy. I grabbed the following CSS code from your site:
div.widget_rss ul li a.rsswidget { font-size: 1.0em; font-weight: bold; }
And modified it to add italics:
div.widget_rss ul li a.rsswidget { font-size: 1.0em; font-weight: bold; font-style: italic; }
That should work. Hope this helps!
Forum: Themes and Templates
In reply to: Css from linkThe URL part has to link to a file (something that ends in a .png, .jpeg, or such) – in the code you provided, you’re only linking to a folder. So, start by pointing to an image file.
If you need additional help or if you’re still confused, feel free to reply.
Forum: Plugins
In reply to: custom permalinks/URIsOne way I can think of would be to have a custom GET parameter (e.g.
example.com/?s=query+terms&my-plugin-parameter=groups
), have your plugin detect this GET parameter, and use that data to formulate a WP Query request.Forum: Fixing WordPress
In reply to: Changing custom header CSSI played around with things using Google Chrome’s “Inspect Element” tool, which lets you edit a website’s code on-the-fly. Here are some thoughts.
I can see you already have part of the form commented out. Try going ahead and commenting the whole thing out, starting with
<form name="ccoptin" id="CC" action="https://visitor.constantcontact.com/d.jsp" target="_blank" method="post">
and ending at
<button type="submit" class="submitLink cufon"><cufon class="cufon cufon-canvas" alt="SIGNUP" style="width: 52px; height: 13px;"><canvas width="61" height="18" style="width: 61px; height: 18px; top: -4px; left: -1px;"></canvas><cufontext>SIGNUP</cufontext></cufon></button> </form>
After that, I inserted a manual link like so:
<a href="https://www.snowcityarts.org/contact.newsletter-sign-up" id="newsletterSignupLink">Newsletter Signup</a>
(As an aside, is there supposed to be a period after “contact” in that URL, as opposed to a dash?)
But the link is floating over the logo, and not easily visible. The form has this CSS code attached to it:
@media screen #header form#CC { position: absolute; width: 210px; top: 16px; left: 486px;
We already added an ID to the new link (
id="newsletterSignupLink"
), so you just need to modify the CSS like so:@media screen #header, form#CC, #newsletterSignupLink { position: absolute; width: 210px; top: 16px; left: 486px;
And that worked when I did it in Chrome. Does it work for you?
Forum: Fixing WordPress
In reply to: Changing custom header CSSThanks, it seems obvious now but I couldn’t see it before.
This code controls where the form directs to:
action="https://visitor.constantcontact.com/d.jsp"
So you could change that to keep the form working internally. However, if I’m understanding, you want to remove the form and replace it with a link?
Forum: Fixing WordPress
In reply to: Filter By Title Using Letters A* to O*You need to use regular expressions. For finding A through O:
'/([a-oA-O]+)/'
Put that string as the exclude parameter. It looks for A – O (upper or lowercase), and the + sign tells it to match more than one letter.
Forum: Fixing WordPress
In reply to: Under construction still up, deactivated and deletedCould you link to examples? I didn’t encounter any “Under Construction” messages.
It could be that you’re seeing older, cached versions of your pages.