Hi all,
Im currently scouting for a plugin for Wordpress which will show a certain amount of comments for each blog entry on the home page and under each category.
For example on the home page:
Entry #3
Blog content
Comment
Comment
Comment
Entry #2
Blog content
Comment
Comment
Comment
Entry #1
Blog content
Comment
Comment
Comment
I hope Ive explained clearly. I havent found what Im looking for yet, maybe Im searching the wrong phrases!
Any pointers would be appreciated, thanks for your time!
What is the difference between "Wordpress Theme" and Wordpress Theme Frameworks? In terms of technicalities, Custom theme making workflow, File and folder structure, Anatomy.
I added custom script
wp_enqueue_script('functions', get_bloginfo('template_url') . '/js/functions.js', 'search', null, false);
works great, except
in the functions.js i have
Reset.style.background = "url('../images/searchfield_clear.png') no-repeat top left";
now this used to work before, until changed to pretty permalinks and .htaccess
the folder hierarchy is like:
themename/js themename/images (the images and js folder are in themename folder)
i tried ../images - ./image - /images
normally it should go back 1 level where-ever the js file is located....
i dont want to use full path
is there a other way that wordpress can recognize in the javascript file to have the correct path?
currently i am just confused what i am doing wrong
Contributor can not delete/change his/her posted item after it has been published on wordpress blog.
How can I do this?
Ps: my purpose (read this to see the big picture)
What is the difference between "Wordpress Theme" and Wordpress Theme Frameworks? In terms of technicalities, Custom theme making workflow, File and folder structure, Anatomy.
Wordpress default theme Vs Wordpress theme's framework's Child theme
I am trying to create the below function in my theme's function.php file and call it from my taxonomy.php file via
query_brands_geo('dealers', 'publish', '1', $taxtype, $geo, $brands);
all variables are set in taxonomy.php.
The below query works perfect if I put it directly in my taxonomy.php file. What am I missing to make this work as a function?
As a function I get this error statement for argument repeated for 2-6:
Warning: Missing argument 2 for query_brands_geo()
function query_brands_geo($posttype, $poststatus, $paidvalue, $taxtype, $geo, $brands) {
/* Custom Query for a brand/geo combination to display dealers with a certain brand and geography */
//Query only for brands/geography combo and paid dealers
$wp_query = new WP_Query();
$args = array(
'post_type' => '$posttype',
'post_status' => array($poststatus),
'orderby' => 'rand',
'posts_per_page' => 30,
'meta_query' => array(
array(
'key' => 'wpcf-paid',
'value' => array($paidvalue),
'compare' => 'IN',
)
),
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => $taxtype,
'field' => 'slug',
'terms' => $geo
),
array(
'taxonomy' => 'brands',
'field' => 'slug',
'terms' => $brands
)
)
);
$wp_query->query($args);
}
add_action( 'after_setup_theme', 'query_brands_geo' );
I made a custom page template (for example, for About page), added Template Name inside the file and saved that. Then I tried to add a page in wp admin console using that template. It said that the page had been created successfully but when I try to open it in browser, it shows me 404 error. What did I do wrong?
Thanks.
Is there any good tutorials to convert HTML+ CSS to wordpress? not PSD 2 HTML? I mean if
HTML CSS is available wejust need to convert a XHTML CSS template to installable Wordpress 3.0 Theme? I'm not talking about PSD 2 HTML.
For example this is free CSS template http://www.freecsstemplates.org/preview/regeneracy/ I just want to download it and convert this css template into Wordpress 3.0 installable theme.
I'm working on a WordPress 3.0 multi-site installation. Each new blog will use the same theme with slight modifications (a custom Thesis install, if it matters). I'm trying to automate the set-up process for each new blog as much as possible.
To that end, I'd like to automatically add widgets to my custom sidebars and widget-enabled footers. It'd be even better if the widgets could have pre-set parameters/content, that I or the blog owner could then go into the Widgets panel and edit.
I've searched high and low and haven't been able to figure out a way to make this work. Any and all suggestions are welcome. Thanks so much!
Hello,
I am using a customised version of search-theme-from.tpl
When I use the search box, I do get transferred to the search page. But the search does not actually take place. The search box on the search results page does work though. This is my search-them-form.tpl.php file (demo :
<input type="text" name="search_theme_form_keys" id="edit-search-theme-form-keys" value="Search" title="Enter the terms you wish to search for" class="logininput" height="24px" onblur="restoreSearch(this)" onfocus="clearInput(this)" />
<input type="submit" name="op" id="edit-submit" value="" class="form-submit" style="display: none;" />
<input type="hidden" name="form_token" id="edit-search-theme-form-form-token" value="<?php print drupal_get_token('search_theme_form'); ?>" />
<input type="hidden" name="form_id" id="edit-search-theme-form" value="search_theme_form" />
There is also a javascript file involved. I guess it's use is pretty clear from the code:
function trim(str) {
return str.replace(/^\s+|\s+$/g, '');
}
function clearInput(e) {
e.value=""; // clear default text when clicked
e.className="longininput_onfocus"; //change class
}
function restoreSearch(e) {
if (trim(e.value) == '') {
{
e.value="Search"; // reset default text onBlur
e.className="logininput"; //reset class
}
}
}
What can be the problem and how can I fix it?
I'm trying to remove the unsightly embedded <STYLE> tag the built-in Recent Comments widget puts in my <HEAD>, but I can't seem to get the syntax right. It originally calls
add_action( 'wp_head', array(&$this, 'recent_comments_style') );
to add it (in wp-includes/default-widgets.php, line 609), and I'm trying to undo it.
I think it should be something like this:
remove_action('wp_head', 'WP_Widget_Recent_Comments::recent_comments_style');
but with all the variations I've tried I still can't get it right. Does anyone know how to achieve this?
Possibly Helpful:
Function Reference: remove_action
In Wordpress, I'm looking for some way to add a "last" and a "first" class to list items inside Wordpress widgets. The HTML could look like this:
<div class="widget-area">
<ul >
<li class="widget_recent_comments">
<h3 class="widget-title">Recent comments</h3>
<ul id="recentcomments">
<li class="recentcomments">Comment 1</li>
<li class="recentcomments">Comment 2</li>
<li class="recentcomments">Comment 3</li>
<li class="recentcomments">Comment 4</li>
</ul>
</li>
<li class="widget_my_links">
<h3 class="widget-title">My links</h3>
<ul id="my-links">
<li class="item">Link 1</li>
<li class="item">Link 2</li>
<li class="item">Link 3</li>
<li class="item">Link 4</li>
<li class="item">Link 5</li>
</ul>
</li>
</ul></div>
In this example above i'd like to have first/last classes added to the li with "Comment 1", "Comment 4", "Link 1" and "Link 5".
Is there an easy workaround for this? (I don't want to do this with javascript)
Thank you.
The default output from Drupal's Form API is:
<input id="edit-submit" class="form-submit" type="submit" value="Save" name="op"/>
How do I theme that so I get:
<button id="edit-submit" class="form-submit" type="submit">
<span>Save</span>
</button>
I need the inner span-tag so I can use the sliding doors CSS technique.
I guess I need to override theme_button($element) from form.inc but my attempts so far have been unsuccessful.
Hello,
I'm hoping somebody knows the answer :).
Within wordpress in the users section I would like to add a new row which will data pulled in from the Register Plus plugin.
Where would I need to create a new row?
My Example:
Username Name E-mail Role **Website** Posts
Admin Admin [email protected] Administrator google.com 2
Thanks.
I've got a wordpress admin panel for one of my themes and one of the boxes has an input for some code to drive google adsense. when I put the code into the box and call it with my php tags the code comes out like this:
<script type="\"text/javascript\""><!--
google_ad_client = \"pub-9295546347478163\";
/* Leaderboard 5/17/2010 */
google_ad_slot = \"7593465074\";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="\"text/javascript\"" src="%5C%22http://pagead2.googlesyndication.com/pagead/show_ads.js%5C%22">
</script>
Which I assume is a feature to stop SQL injections. How can I call pure code form a box? This is how I currently have that textbox setup.
array( "name" => "Code for Top ad",
"desc" => "Enter the HTML that will drive the banner ad for the page header",
"id" => $shortname."_headerAd",
"type" => "textarea"),
and then echo it out with this:
<?php echo get_option('lifestyle_headerAd'); ?>
I have a WordPress site (on my localhost) that uses a <ul> for a custom menu. How can I change the CSS of a <li> on hover only if it has a <ul> sub-menu?
All the main menu items have a border-radius and I want to remove this on the current item (Services, below) for example:
<div class="main-nav">
<ul class="menu" id="menu-main-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Services</a>
<ul class="sub-menu">
<li><a href="#">Item One</a></li>
<li><a href="#>Item Two</a></li>
</ul>
</li>
<li><a href="#>Contact</a></li>
</ul>
</div>
I can't find a CSS solution and I've tried jQuery too:
$('ul.sub-menu').parent().hover(function(){
$(this).addClass('no-radius');
});
UPDATED
I'm building a WP blog around an existing website.
http://uk2canadapensiontransfers.com/news.php
When I use the following default code...
<?php wp_get_archives('title_li=&type=postbypost&limit=10'); ?>
or previous and next page links...
Wordpress attaches strings like... ?p=%post_id% to index.php
But I need them to attach to news.php, e.g. news.php?p=%post_id%
How can I change the Wordpress settings so that news.php can be my index and index.php remaind outside of the WP system.
I created a new drupal 7 theme and trying to implement hook_theme at template.php like this:
function mytheme_theme($existing, $type, $theme, $path){
return array(
'mytheme_header'=>array(
'template'=>'header',
'path'=>$path.'/templates',
'type'=>'theme',
),
);
}
then I placed header.tpl.php into templates directory and cleared all caches, and call theme function:
theme('mytheme_header', $vars);
but it did not work and render page with header.tpl.php. What's wrong with my code?
Here's the page:
http://www.gammagoochee.com/media/
WP is adding a p tag on line 55 between the end of my header and the beginning of my post content. I am using Raw HTML Pro, and the post starts with content surrounded by [raw] tags.
There is no content between the last tag in my header, and the beginning of my post. This doesn't happen on my other site pages, and the only difference is that this page is using a template, but the template is the same in this part of the page. All the template does differently than the other site pages is add a sidebar.
Anyone have any ideas whatsoever why WP is adding this p tag, and/or how I can prevent it?
Thanks so much!
I use the image attachment page to show images attached to a post one by one, in a slideshow sort of affect. I'd like to be able to display the total number of images attached to the parent post and the number of the particular image that's being shown on any given attachment page so you see the picture and the words "Image 3 of 15" for example.
I've played around with some different code and can get the total number of images to show on the post page, but when I insert the code on the attachment page template it always shows "1 of 1." I was having this problem a while ago and decided to re-address it, unfortunately I don't have the original code that I used and can't remember it.
Anyone have any suggestions?
Would it be quicker to make wordpress theme direct on FTP? bcoz client want to see the progress and if i will work on local XAMPP then it would not be possible to update any changes quickly.
How to setup theme development environment with any free and lightweight IDE?
I know XHTML CSS but PHP knowledge is not much and i want to get familiar with one framework to make wordpress themes quickly for clients
Available Frameworks
* Atahualpa
* The Buffet Framework
* Carrington
* Hybrid
* Sandbox
* Thematic
* WP Framework
* Thesis
I am interested in learning to create custom backends for Wordpress that extend the functionality.substantially. Anyone know of any books or resources that are particularly helpful for this.
Hi folks,
I use Smarty View, but want to benefit from theme options.
Since for theming cake use Theme View, I cant use both Smarty and
Theme at the same time.
Perhaps can combine the code but am not that familar with View eingine
core.
Already have a lot views done with smarty and do not want to recreate
all of them with plain php.
Is there a ready combined solution i.e. Themed Smarty View?
Thanks