Mehmet
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Using custom fields check/call in a functionin custom function to place a
global $post
;right after
function thumb_video($test_fnname,$test_w,$test_h,$test_align) {
fixed it, the issue is resolved.
Forum: Fixing WordPress
In reply to: Using custom fields check/call in a functionThe problem is, when I dump that code it skips video custom field.
There is a post that has video key added in custom fields, and a post_thumbnail is set.
If/else returns false for video when using that code as is, and it returns post thumbnail which is a lower priority in if/else query.
Everything seems to be correct but something is wrong that i can’t figure it out
Forum: Fixing WordPress
In reply to: Using custom fields check/call in a functionHere is complete code that i use
Functions.php
function thumb_video($test_fnname,$test_w,$test_h,$test_align) { $test_video = get_post_meta($post->ID, 'video', TRUE); /* Custom field video check */ $test_thumb = get_post_meta($post->ID, 'thumbnail', TRUE); /* Custom field thumbnail check */ if($test_video != '') { /* If a FLV video is attached to post */ ?> display flv <?php } elseif($test_thumb !== '') { /* If custom field thumbnail is defined */ ?> call custom field defined thumbnail <?php } elseif ( has_post_thumbnail() ) { /* If post have thumbnail */ ?> call post_thumbnail <?php } else { /* If there is no video, thumbnail custom field, or post_thumbnail defined, display default category image */ ?> call custom image <?php } }
and in home.php
<?php $gabquery = new WP_Query();$gabquery->query('showposts='.$npdv_options["feaPostCount"].'&cat='.$npdv_options["featuredCatID"]); while ($gabquery->have_posts()) : $gabquery->the_post(); ?> <?php thumb_video('featured','342','256','alignnone'); */ ?> <?php the_excerpt(); ?> <?php endwhile; wp_reset_query(); ?>
Forum: Fixing WordPress
In reply to: Using custom fields check/call in a functionanybody know how to create functions that contains custom fields in?
Forum: Fixing WordPress
In reply to: Using custom fields check/call in a functionif ($test_video != '') { ?>
with this change, i get a false for if call, while actually i had a custom field defined with video key,so it just jumped to second div and displayed thumbnail ??
Forum: Plugins
In reply to: If Custom field exist => do that.. If it is not => do something elseWorks perfect, thank you very much
Forum: Fixing WordPress
In reply to: Clicking on date archive redirects to main pageNo, it is not theme issue since same problem appear also no default theme. Obviously there is a redirect that I can’t figure out where and how to disable it.
I removed all .htaccess files problem still reproducible
Used template tag is;
<?php wp_get_archives('type=monthly&limit=5'); ?>
Whenever i click on a link, no matter where I am, I’ll be redirected to main page. I’ve tried to re-upload WordPress, but didn’t work. This problem is frustrating
Forum: Plugins
In reply to: Multiple loops, duplicate postsis there anyone who has answer for that issue?
Forum: Plugins
In reply to: How to exclude a post from the loop<?php query_posts(array('showposts'=> 3,'cat' => 27,'post__not_in' => array($thePostID))); ?>
Worked like a charm, thank you very much filosofo
<?php if (is_home()) { $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; } query_posts(“paged=$paged&showposts=1”); ?>
doo stuff
<?php endwhile; ?>
Forum: Fixing WordPress
In reply to: Urgent Help needed [All permalinks are broken after update to wp2.6)I have before updated permalink structures but site was still giving problem, after having your answers, I did it once more and found out that the .htaccess file is not writeable and that was the source of problem.
Now I at least have a clue how to fix the problem. Thanks guys ??
Forum: Themes and Templates
In reply to: looking for a product showcasing themeWhat about this one
Forum: Fixing WordPress
In reply to: Sidebar below content :(Forum: Themes and Templates
In reply to: Custom Select Posts and Pagination – ProblemLittle bit more turning around helped me out to find the solution.
Document was saved in UTF 8 (not UTF 8 witout BOM) format and that was the reason of problem. Saving it as UTF 8 without BOM solved my problem