The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
107 views

Anchor Text code string is automatically modified by WordPress

I have created an ad for a merchant wanting to rent ad space on my website home page. After creating the ad, (anchor text and pic/graphics with embedded hyperlink) the merchant has requested I remove ...
0
votes
1answer
218 views

Remove line breaks from <code>?

This code form HTML editor: <code>&#91;shortcode&#93; &#91;bar&#93;foo&#91;/bar&#93; &#91;bar&#93;foo&#91;/bar&#93; ...
1
vote
2answers
131 views

Hiding styles from Facebook

Some of my pages/posts have very short custom stylesheets at the beginning of them. I know this isn't great practice, but it's worked very well thus far. The problem, however, is linking on Facebook: ...
4
votes
2answers
1k views

How to create a custom button for the visual editor that adds 4 non-breaking spaces? (plugin or simple code)

To Wordpress' visual editor (TinyMCE), I would like to add a button that adds four non-breaking spaces when clicked, like this: &nbsp;&nbsp;&nbsp;&nbsp; I found some plugins that ...
1
vote
3answers
209 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 ...
1
vote
1answer
67 views

How does WordPress determine which multisite the user is on from the URL?

What is the file and line where WordPress determines which multi-site the user is on from the URL? I've been looking through the code all afternoon and can't figure out where it turns ...
0
votes
2answers
81 views

Filter and Search

I am working on my site which is a WordPress based site. It is a sweepstakes site well winprizesonline.com is the site which inspired me most. Now I want a dynamic search like that site on my site but ...
1
vote
1answer
267 views

stats_get_csv (Wordpress Stats) to only display top posts (not pages)

I'm trying to get the first 10 posts based on page views through Wordpress Stats (now called Jetpack). I managed to get this code to work (approximately..) after digging for hours over the forums ...
-2
votes
1answer
74 views

Code snippet plugin not working correctly with Windows live writer and Wordpress

Downloaded the The Live Writer Source Code Plug-in For WordPress.com Blogs. The preview looks good but the published version looks really messed up. Could anybody let me know what could be the fix. ...
2
votes
1answer
492 views

API integration with WordPress

I'm trying to integrate a 3rd party API with WordPress. I fear this is above my head. I was this code but I'm not exactly sure how to make is work in WordPress. Is it possible? $ch = curl_init(); ...
8
votes
2answers
346 views

How to get a variable number of posts per post type on the main loop?

I'm looking for a way to balance the content at the homepage of my blog: the blog has a few post types like Poscasts, Videos and Blog and I'd like to have let's say 10 Posts on the homepage, but I'd ...
0
votes
1answer
125 views

Commenting out in HTML editor breaks template

There is a certain section of HTML that I need to comment out within the HTML editor in Wordpress. But when I do so, it breaks the HTML. After looking at the source code, I noticed that it converts ...
0
votes
2answers
187 views

Add Permalink to Post Thumbnail, syntax code issues

I´d like to link the_post_thumbnail by using the the_permalink. I do this (It Works without link) <?php $args = array( 'post_type' => 'xyz', 'posts_per_page' => -1, 'orderby' => 'rand' ...
1
vote
2answers
109 views

How do i structure my theme folder to avoid one huge list of files

When working with a worpress site with lots of custom post types and lots of page templates, my theme folder is looking messy. What are the accepted best practices to organise code files in WordPress? ...
1
vote
1answer
77 views

Most liked page not displaying posts

I was looking for a post rating system for a while, then I stumbled across a great tutorial: http://wp.tutsplus.com/tutorials/how-to-create-a-simple-post-rating-system-with-wordpress-and-jquery/ I ...
0
votes
1answer
98 views

Themes with variable width or single columns? I want to display source code

I've just set up a new wordpress blog, and as a developer I want to post some source code as well. Now I found the suitable plug-ins I need, and also a sleek theme, or so I thought. The problem is ...
20
votes
5answers
35k 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
-1
votes
3answers
1k views

Is it possible to use github:gist with Wordpress? [closed]

I have a wordpress blog i.e. bruno.wordpress.com I would like to use github:gist. I paste my code in gist and get a link like: https://gist.github.com/1323748 Is there a way to show this code in my ...
1
vote
1answer
120 views

If in category to be inside of a function

I have this code in WordPress index.php and I was wondering how can I transfer this in to a functions.php to be a part of a function? <?php if (in_category('featured')) : ?> <a ...
2
votes
3answers
642 views

Pinterest Integration Using functions.php

I use a theme to build an portfolio. I´d like to add an pinterest "pin-it button" into the fuctions.php: Facebook, Google+ an Twitter were done, just the pinterest won´t work. Can´t found the the ...
1
vote
1answer
446 views

Which theme foundry has clean coded themes, where code is poetry [closed]

I'm looking to find a theme foundry (ie. woothemes, elegant themes) that has themes that are very well coded; where "code is poetry". To be more precise, I'm looking for themes coded in "the wordpress ...
0
votes
2answers
117 views

Line breaks </ br> changing to <!— br--> when switching between HTML and Visual tab!

I'm a code newbie and I was just making a wordpress post and instead of using the correct line break code of <br /> I used </ br> in the VISUAL editor. When I switched to the HTML editor ...
0
votes
2answers
398 views

I want to remove the links from the term list returned by get_the_term_list

I want to keep this category title on my pages, but I don't want it to be a link. <?php echo get_the_term_list( get_the_ID(), 'portfolio_cats', ' ', ' , ', ' '); ?> Can anyone help? Thanks
0
votes
1answer
324 views

How to remove automatic generated <p> tag in Home page

I am new to Wordpress and need some helps here. I am trying to add posts that have written codes for the demonstrated purpose of programming languages. I installed SyntaxHighlighter Evolved plugin. ...
0
votes
1answer
272 views

Insert PHP code in Text

I have this code for insert a permalink but doesn't work, return exactly code: $text = '<form><td>Permalink to: <?php the_title();?></td><textarea cols="85" rows="2" ...
0
votes
1answer
78 views

post/page content

i am trying to insert a post/page into one of my themes files and it wont display shortcodes or php i have created a page called home in the wordpress admin-paned and inserted into my code the ...
0
votes
3answers
134 views

I want a widget to appear on only one page

I have a rotating images widget I want to display on my homepage. My selected homepage is a static front page I created with several other pages to make my blog look more like a website than a blog, ...
0
votes
2answers
267 views

How to manage multiple wordpress project with shared code base

I need to build several highly customized WordPress instances beyond look and feel changes. For example, in one of the instances, any categories with children need to display in its own dropdown on ...
0
votes
2answers
129 views

Where do you add code in custom fuctions so it works on a specific page?

Thanks for replying but I still can't get it to work. Is anything wrong with this code? <?php class custom_loop extends thesis_custom_loop { function page() { if(is_page( ...
44
votes
7answers
6k 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 ...
0
votes
1answer
305 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
57 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
4answers
266 views

Problem with <code> tag

Where you can see it: http://themeforward.com/demo2/functional-codes The first button is my code, as it should appear. The second button is within <pre><code></pre></code> ...
0
votes
2answers
127 views

Tips for managing code when developing a parent theme framework

I have started work on an open source theme framework that pulls in lots of great code & resources from elsewhere. For example it uses: jQuery Option Framework Theme LESS etc etc. Most of ...
1
vote
1answer
146 views

Cause of Blank Lines Being Added to WP FIles?

Does anyone know why some of my websites add a blank line after every line of code, while others on the same host and server leave the files untouched? A few details that might help: PHP Version ...
5
votes
1answer
787 views

how to group custom post types

hi wanted to know do i group my custom post types to appear together in a group in the wordpress back end menu bar like this below in the picture what code do i have to use in my functions.php so that ...
1
vote
2answers
102 views

How can I include PHP-Code to my post?

I would like to use PHP in some posts. These posts should look like normal posts, be in the archive and categories like normal posts an have tags. I don't need PHP in every post, but it would be ...
0
votes
1answer
70 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 ...
1
vote
1answer
49 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 ...
0
votes
2answers
90 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 ...
1
vote
2answers
565 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 ...
0
votes
3answers
1k 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 ...
1
vote
1answer
146 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 ...
1
vote
2answers
445 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
364 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
44 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
1answer
149 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 ...
0
votes
2answers
143 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 ...
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( ...
0
votes
1answer
604 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