Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
45 views

Looking for a good way to include php code in posts, but using special include markup rather than direct php code

Ok, bit of a weird one... I want to include php code on one of my pages within the content by adding something like: Welcome to the payment page [paymentform] Blash blah vlha... And then ...
0
votes
2answers
154 views

Is it possible for two WordPress plugins to share the same code base?

So I have written my first WordPress plugin for production and in the next few days I will be starting up on another project where I might have to write two plugins for the same WP site because they ...
0
votes
1answer
673 views

what code to add to search.php

what line of code can i add to my search page in order to display the results up to 3-5 pages per "search
0
votes
1answer
348 views

Formatting <code>?

I have serious trouble displaying code blocks in my theme. I want to display something like: <something> <something-else> Content </something-else> ...
7
votes
2answers
2k views

Return $post_id when DOING_AUTOSAVE?

I see the following pattern over and over, on this site and on other places: add_action( 'save_post', 'wpse14169_save_post' ); function wpse14169_save_post( $post_id ) { if ( defined( ...
1
vote
2answers
62 views

Need resource on available functions and objects

I am a programmer, and love jQuery. Visual jQuery and other resources is THE best place to get all the code/function et get your hand dirty... But when it come to WordPress.. the code is too thin or ...
0
votes
2answers
2k views

PHP nested If statement syntax

Hiya Guys! so I need some help with this: <?php $newsposts = new WP_Query('cat=restaurant'); if ( is_front_page()) { echo '<h3 class="member-review">Latest ...
0
votes
2answers
140 views

How can i share codes on my blog?

I want to add <code> tag to my post, easily. For example, Adding code is very easily in Stackoverflow and other sites. Basically, we can add codes between apostrophes (``) I need something like ...
0
votes
1answer
150 views

Formatting error with source code on WordPress.com?

I've been trying to post some Java code to my blog, but it seems like it has some problems with the formatting. First, whenever I copy/paste code into the editor, it's pasted as pre-formatted, which ...
0
votes
2answers
92 views

Switching Code plugins

I am currently using "Wordpress Code Snippet" to add functionality to my code i insert into my posts. The way this plugin works is that you add the code into the plugins library in the settings and ...
0
votes
1answer
53 views

Find Total Authors

Please suggest a code snippet to get the total number of authors on a blog who have at least one published article. Thanks
1
vote
3answers
220 views

Proper implementation/use of code/syntax highlighting

I've already read what I can on a couple of sites and installed this plug-in: http://en.support.wordpress.com/code/posting-source-code/ http://alexgorbatchev.com/SyntaxHighlighter/ I'm missing how to ...
0
votes
3answers
106 views

How can this crude function be improved?

In the first function below, inside the foreach, I'm calling out to the 2nd function in order to test for the occurence of matching category ids that I want to remove from the category listing. ...
0
votes
1answer
151 views

Why aren't my Follow Me links working?

I've been working o my website and I just noticed that most of the links from my Follow Me plugin are broken. The feed link works fine, but everything else leads to a 404. I can see what's wrong ...
-1
votes
1answer
345 views

feed url problem

hey hii everyone, i have a function to fetch the videos from the rss feed of youtube, so that i can display selected videos to my blog for that i am using this youtube-search-feed url ...
1
vote
3answers
594 views

Code Friendly Block Quotes

I have a self-hosted Wordpress Blog (located at http://www.dougmolineux.com/wp if you're interesed :) I put a lot of Code Snippets on there, because I'm a programmer. How do I make these "snippets" ...
1
vote
1answer
437 views

Proper indentation of code generated inside hooks

I really like having my code all properly indented and all, but all the code generated by wordpress, like the one that appears on the header when we use wp_head(), loses all the indentation. I think ...
1
vote
2answers
327 views

VERY new to coding - keep breaking site trying to add to functions.php

I really appreciate everyone on this site who takes the time to answer questions here. I've learned a good deal already reading, but am sure I could learn even more if I could get past at least one ...
2
votes
2answers
806 views

Replacing the default content created while the site creation

How do you replace the default title for first comment? Mr WordPress on Hello world! I could not able to locate this in theme's comments.php file I want to edit the title 'Mr wordpress on Hello ...
0
votes
1answer
535 views

How to Configure Events List in Wordpress to Disappear Event Once Date is Past

I currently have some code setup to display upcoming events set by the admin based on the date of the event. The upcoming events are sorted by the next upcoming event, starting from the top, and then ...
-1
votes
1answer
120 views

echo or return? [duplicate]

Possible Duplicate: append_content help i have a code which is use to display twitter tweets but the problem is, it is displaying before the content of post, i know the problem is with ...
1
vote
2answers
371 views

write in functions.php

i just want this code to be added in my functions.php, so that it will directly display after my post ends currently i am adding this code to my single.php, but i want to add this is in functions.php, ...
27
votes
5answers
49k views

How to display sql query that ran in query?

I have come across a function before that displayed the exact SQL code that was used in a loop for example, but can't remember. Can anybody tell me that function? Cheers
4
votes
5answers
4k views

What theme is good for posting code? [closed]

I have my blog hosted at www.alphaot.com and I guess it's good enough. But problems arise when the lines of code get longer than 30 characters. The lines just wrap and get icky or something they even ...
1
vote
1answer
155 views

Why does this snippet in a blog post make WordPress crash?

Ok, this is seriously weird and I have no clue what's going on here. I am using WordPress 3.0.1, I create a new blog post, give it a title, paste the following code into the blog post and hits Save ...