The code tag has no wiki summary.
0
votes
1answer
226 views
Allow tags between shortcode in comments
On my personal blog, I would like commentors to be able to post code using certain shortcodes (eg [html], [css], [js], [php]). I still want to strip tags for comments for security reasons, but allow ...
0
votes
1answer
63 views
Numbering lines of code with the <code> tag?
The wordpress tag is used to display code on a page (refer to: http://themeforward.com/demo2/2011/09/12/code-tags-in-post/) but I am having a hard time finding a function that will number the lines ...
0
votes
1answer
50 views
Changes in code only show after changing theme
I have a weird problem that happens only in one of my Wordpress sites (which is on a development server with many other wordpress sites that don't have this problem):
When I make changes in code - ...
0
votes
1answer
237 views
Wordpress is converting & to & inbetween [code] brackets
I installed a syntax highlighter plugin so I could post and highlight code snippets.
My problem is wordpress is converting special characters in my code (e.g. from & to &) when I really just ...
1
vote
1answer
43 views
Where to save common libraries?
I have a multiple-site WordPress install. I have decided to centralize as many of my libraries as possible into one spot, for obvious organizational reasons, and in order to reduce bloating. Many of ...
1
vote
2answers
452 views
Sidebar login: How do I get the username to show after “Welcome”?
Yo,
Sidebar login used to say "Welcome %username%" without a problem until I applied __() to the "Welcome" string. Since then the welcome message just says "Welcome" (in all languages) but i can't ...
2
votes
3answers
494 views
Editing Source Code in Wordpress
I am a senior in a college computer science program, and therefore have a decent knowledge of code and several languages. However, I am doing a summer internship type program, and the company I am ...
0
votes
3answers
762 views
Displaying Meta-Box Data Properly
Quick and dirty, I have meta boxes pertaining to concert information. (i.e. venue and location) and am trying to figure out how to properly display them in my post.
At the moment to display the ...
39
votes
7answers
3k views
Best collection of code for your .htaccess file [closed]
We have the Best Collection of Code for your functions.php file thread, so I thought that it might be useful to create a thread for our .htaccess files.
AND PLEASE REMEMBER TO ADD ANY OF YOUR OWN ...
1
vote
2answers
350 views
how to attach an image to a custom post type in wordpress using just code
I'm dynamically creating a custom post type in code (not in the editor) and I have an image I want to attach to my custom post type as a post thumbnail, and have it resized, etc. How do I do that. I'm ...
1
vote
1answer
299 views
Pasting code into WordPress post - LFs being eaten
I'm sure this is an inappropriate question for this SE because it's not programming related AFAIK but maybe someone here has an idea. I've been posting code into my blog for years and have had no ...
0
votes
1answer
40 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
120 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
481 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
293 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>
...
6
votes
2answers
1k 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
57 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
1k 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
123 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
138 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
88 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
51 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
197 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
98 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
142 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
290 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
416 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" ...
0
votes
1answer
326 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
224 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
592 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
478 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
104 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
338 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, ...
15
votes
5answers
18k 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
527 views
What theme is good for posting code?
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
109 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 ...