qwert Posted May 20, 2009 Share Posted May 20, 2009 Grretings! I am having trouble with the following script: <?php if (in_category('A') || has_tag('B) ): ?> <b><a href="<?php the_permalink() ?>">Please visit the thread </a></b> <?php } else { ?><?php $more = 1; the_content('', TRUE); ?><?php endif; ?> It doesn't work can you help me? Quote Link to comment https://forums.phpfreaks.com/topic/158978-php-misshaps/ Share on other sites More sharing options...
Maq Posted May 20, 2009 Share Posted May 20, 2009 Elaborate on, "doesn't work". You're missing a single quote after B. has_tag('B') Quote Link to comment https://forums.phpfreaks.com/topic/158978-php-misshaps/#findComment-838452 Share on other sites More sharing options...
qwert Posted May 20, 2009 Author Share Posted May 20, 2009 Elaborate on, "doesn't work". You're missing a single quote after B. has_tag('B') Thanks, but Still can't get it to work... <?php if (in_category('A') || has_tag('B') ) { ?> <b><a href="<?php the_permalink() ?>">Please visit the thread</a></b> <?php } else { ?><?php $more = 1; the_content('', TRUE); ?><?php } ?><?php endif; ?> Quote Link to comment https://forums.phpfreaks.com/topic/158978-php-misshaps/#findComment-838455 Share on other sites More sharing options...
Maq Posted May 20, 2009 Share Posted May 20, 2009 Please explain what's wrong. What's supposed to happen. What's not supposed to happen. Are there errors? NOTE - Surround your code with tags. Quote Link to comment https://forums.phpfreaks.com/topic/158978-php-misshaps/#findComment-838478 Share on other sites More sharing options...
qwert Posted May 20, 2009 Author Share Posted May 20, 2009 Please explain what's wrong. What's supposed to happen. What's not supposed to happen. Are there errors? NOTE - Surround your code with tags. It is supposed to detetect weather there is a tag "A" in an article "B" and if there is - to put a link leading to the article, with the nam,e - Please visit etc. Is my basic idea. Otherwise said, I dan't want users to see the whole article thrrough RSS, but rather to be motivated to come to the site. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/158978-php-misshaps/#findComment-838494 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.