The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
76 views

Including Angle Brackets In Pre Sections

I am attempting to post some java code between pre tags but the angel brackets get removed. For example: private HashMap<String, HashMap<String, Integer>> featureCounts; becomes ...
0
votes
1answer
610 views

Log in / Log Out Custom Button

On our website we have a "Join" button in the top right corner and a log in / log out link using <?php wp_loginout(); ?> . Instead of having the log in / log out link we would like to have it ...
0
votes
1answer
117 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 ...
1
vote
2answers
70 views

WP-Markdown treating java generics like HTML tags

With some Java generic code in a code block, ie: List<Integer> l = new ArrayList<Integer>(); WP-Markdown was treating as HTML, and no matter what I did, the code above got turned into ...
1
vote
2answers
135 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: ...
0
votes
1answer
262 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; ...
2
votes
1answer
375 views

Sublime Video: Playlist which gets all attached videos

I searched a way to automatically load all attached videos in a custom post type as SublimeVideo playlist. After some time I got it working and here I'll share the code with everyone who is interested ...
6
votes
2answers
273 views

WordPress Internal @ Mentions

I'm looking for a way to link to author pages within one WordPress install simply by putting the @ symbol in front of a person's username in a post.... just like on twitter. Example: If the username ...
1
vote
1answer
71 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
85 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
293 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
76 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
718 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(); ...
0
votes
1answer
146 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
247 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
113 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
107 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 ...
1
vote
1answer
132 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
713 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 ...
2
votes
1answer
546 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
1answer
214 views

Show page title just from the first child-page in template

how can I do this: Pages: Home - sub-1 -- sub-sub-1 --- sub-sub-sub-1 On home-page should only show the page-title of the first child-page like: sub-1 I found this: <?php $child_pages = ...
0
votes
2answers
123 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
471 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
352 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
296 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
85 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
158 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, ...
8
votes
2answers
365 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
2answers
295 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
136 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( ...
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 ...
0
votes
2answers
129 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
159 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
828 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
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 ...
0
votes
4answers
271 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> ...
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
332 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
71 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
59 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
520 views

Wordpress is converting & to &amp; 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 &amp;), when I really ...
1
vote
1answer
52 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
613 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 ...
3
votes
3answers
1k 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
2k 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 ...
45
votes
7answers
7k 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
473 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
372 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 ...