candell
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to do this in wordpressActually thinking about it, only the homepage needs this functionality, the rest of the site can use standard menus.
How would I implement this in wordpress for only the homepage? I could use custom fields, not very user friendly but it would work on the homepage template only.
Any other suggestions?
Forum: Fixing WordPress
In reply to: Post Content not visibleI can’t see the post in question either.
Just a side note, there are a heck of a lot of images on your homepage as all of the content loads, you might want to put a lazy load or something on your website to prevent any bandwidth issues with your host.
Forum: Fixing WordPress
In reply to: move WP database using MyPhp import ?You need to do a find and replace on your old url, replacing with your new url.
for example find all instances of
http://www.yourwebsite.com/subdirectory/
with
otherwise all the links in the admin and public facing versions of your site will point to the subdirectory version of your website.
Personally I find it easier to find/replace on the backup.sql filerather than in the database as you have to write find and replace sql commands.
Forum: Fixing WordPress
In reply to: Warning message on some of my blog pagesTry removing the last comma on chandanonline4u’s first array, so
$cardef = array( 'pageid' => 0, 'style' => 'style22', 'category' => $obj, 'blocktype' => 'cattiles', 'appearence' => 'catpages', 'blockheadline' => $carouseltag, );becomes
$cardef = array( 'pageid' => 0, 'style' => 'style22', 'category' => $obj, 'blocktype' => 'cattiles', 'appearence' => 'catpages', 'blockheadline' => $carouseltag );Forum: Plugins
In reply to: Cart66 Promotion codes not calculating correctlyPants, I was going straight to the checkout. Thanks Chumbo
Forum: Plugins
In reply to: Cart66 Promotion codes not calculating correctlyMaybe a stupid question, but where does the buyer enter a promotion code? I created one to apply to all products to save £5. I expected a field in the checkout for the buyer to enter the promotional code, but nothing is showing. Is there some other flag I need to turn on to activate promotions?
Thanks
Forum: Fixing WordPress
In reply to: rss feed to show parent and sub pagesStill struggling to find a solution to this if anyone can help?
Forum: Themes and Templates
In reply to: return all pages of certain templateHi Christian
You can build your queries with an array, this gives you so much power to gather exactly what you need from wordpress
$myquery = array(); $myquery['post_type'] = 'page'; $myquery['post_status'] = 'publish'; $myquery['meta_key'] = '_wp_page_template'; $myquery['meta_value'] = 'scheme.php'; $myquery['posts_per_page'] = '10';I have used this on other pages since, worked perfectly every time.
Forum: Fixing WordPress
In reply to: Change menu link depending on location on siteIn the meantime I have created two different menus and written a script that calls the new menu using wp_nav_menu if on the filter page, else display the normal menu.
Our menu has lots of links though so will be a nightmare to maintain. If anyone has a programatical way of doing it I would love to know.
Thanks
Forum: Hacks
In reply to: sql query help to grab post title, postmeta and featured imageI used query_posts() to achieve what I was after, you can pass all sorts of arguments to it making it very powerful to generate very custom queries
Forum: Fixing WordPress
In reply to: Output depending on category nameAha didn`t know about that, thank you very much for the help.
My first wordpress (and php) website, usually work in asp so it is a learning curve at the moment.Forum: Fixing WordPress
In reply to: Output depending on category nameGetting there, but I have two problems
1. category1 has just one line of text in the description, so I want to remove the paragraph tags. My replace doesn`t remove them
2. my print isn`t working as I’d hoped;
I need to output
<h2 class="cat2"><a href=thelink>The title</a></h2>
so I used
echo '<h2 class="cat2"><a href="'.the_permalink().'">'.the_title().'</a></h2>';
but I get
thelink thetitle<h2 class="cat2"><a href=""></a></h2>Why is it doing that?
Thanks
Forum: Hacks
In reply to: sql query help to grab post title, postmeta and featured imageTrying a different tact, instead of going directly into the database poking around the wordpress knowledgebase I found some fucstions that should do what I am after.
I am almost there but for two things
1. It is printing the correct number of results but all of the titles are the title of the page I am currently on when testing the code. How do I make it pull the title from the row in the loop?
2. It is bringing in everything due to the first line requesting everything of status ‘publish’. I also need to limit the output based upon the meta_key of ‘ _wp_page_template’ being set to ‘scheme.php’
<?php $pages = get_pages(array('post_status' => 'publish')); ?> <?php foreach($pages as $page) { ?> <h1><?php the_post_thumbnail(); ?><?php the_title(); ?></h1> <p><?php echo get_post_meta($page->ID, 'schemeprice', true) ?></p> <?php }?>Forum: Hacks
In reply to: sql query help to grab post title, postmeta and featured imageStill plugging away at this. I need two column values from posts and two rows from metadata so I decided the way to go is to run a query on posts that will grab what I need from there, then within the output loop to run two queries from metadata based on the post_id and also the meta_key.
My second query isn
t working though, it isnt being built correctly[Code moderated as per the Forum Rules. Please use the pastebin]
echo $querystr2; is coming out as
SELECT FROM wp_postmeta WHERE = ‘231’ AND = ‘_wp_attached_file’ so it is missing what to select and the condition in the AND.
Forum: Hacks
In reply to: sql query help to grab post title, postmeta and featured imageOh I see what is wrong with the last posts sql, I am calling wp_postmeta.meta_value twice.
How do I call it so that it matches both i.e.
for post_id = 10
wp_postmeta._wp_page_template = ‘scheme.php’
AND
wp_postmeta._wp_attached_file = not empty