The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
9 views

How can I clean up the code in my template? [migrated]

When I'm coding static websites, I take pride in having code that's well organized, well tabbed, etc. Unfortunately, when I create a WordPress template, my code becomes a complete and utter mess. This ...
0
votes
1answer
48 views

Gist shortcode is not working

I freshly installed a brand new Wordpress for testing purpose as I am intending to refresh my current website. One of the requirement I have is to be able to embed code from Gist. Following the ...
0
votes
0answers
24 views

how to redirect users to a custom page when they click on their display name or “my profile” or dashboard?

How to redirect users to a custom page when they click on their display name or my profile or dashboard on my WordPress site. Because I locked /wp-admin with this add_action('admin_init', ...
0
votes
0answers
58 views

PHP random number in email

I have a Wordpress website where i am making a form so that when a user fills out that form he gets a confirmation email and receives a random order number. I have this PHP function which creates that ...
0
votes
1answer
57 views

Adminbar Missing “Edit Page”

I'm encountering a problem that involves that my Admin bar doesn't show the "Edit Page" on pages I visit on my site. Instead for some odd reason it show "Edit Category" instead on supposed page. Does ...
1
vote
1answer
138 views

Successful or Error Message after running mysql code in functions.php

Just for this article, suppose there is a code that I want to run on my WordPress' functions.php file. It's a code to delete mysql table on my database. For example, here's the code: $wpdb->query( ...
0
votes
1answer
40 views

get post excerpt by query

I'm trying to get post excerpt by query my code is below global $wpdb; $posts = $wpdb->get_results ("SELECT post_title, post_excerpt FROM $wpdb->posts WHERE post_status = 'publish' AND ...
0
votes
1answer
13 views

How to stop displaying the Id without losing the functionality

I am using a custom code to make certain plugin's functionality available only with particular capabilities. Here is the code: <?php // Check if User can Edit // Set permission to false = 'not ...
0
votes
1answer
43 views

how to call new widgets in sidebar in custom theme?

I am developing a theme in which I want to call available widgets ex. Calendar and the installed plugin, I have put it in the sidebar from widget panel but can't see in frontend. Sidebar.php Code-> ...
0
votes
1answer
31 views

Blog only showing code

I would like to have some help. I host a wordpress blog in my raspberry pi running apache2, but when I browse the blog it only shows the code as you can see here http://lifeonpi.sytes.net/raspgrammer/ ...
1
vote
1answer
64 views

Latest post in a specific menu

is it possible to show the latest posts only in a specific menu? This is my menu: register_nav_menus(array( 'primary' => __('Primary Navigation', 'gonzo'), 'mobile' => __('Mobile Navigation', ...
0
votes
1answer
36 views

Display pages from specific page template

Okay I have found the following code on line, which seems to be working and displaying all of the pages using the page_library_html.php template. This code only shows the title of them though. Can ...
-1
votes
1answer
50 views

Simple Redirect but getting the right code?

I need to change these links so the dashboard link directs to the forum profile instead of the wordpress admin panel profile can you help? <ul> <li><a href="<?php ...
-1
votes
2answers
41 views

Code Highlighting in BlockQuote

Many of my Wordpress Blog(http://subinsb.com/) posts have code snippets which is wrapped in blockquote elements. I need to highlight these code snippets. I tried using GeSHi, Prettify Code Syntax, ...
0
votes
1answer
50 views

How to add source code into wordpress post really?

Ok, I have read and followed the instructions as written in this link: http://en.support.wordpress.com/code/posting-source-code/ I have tried all other the solutions, including reinstall the whole ...
0
votes
0answers
9 views

Removing the 1st line in a post snippit showing on homepage AND leave it on the internal post

I have a magazine blog where different writers of each post is credited (i.e. by Larry Hamilton, Sr. Writer). The problem that I am having is that on the homepage the snippit should look like this: ...
0
votes
1answer
33 views

How to get tags and categories?

I used the following code to get tags from the post and then simply echo them: $posttags = get_the_tags($post->ID); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ', ';} ...
0
votes
0answers
40 views

Live coding in WordPress

Is there a plugin or an easy way to integrate code writing and compilation windows in WordPress, for example to duplicate the Learn Python functionality (see at bottom).
1
vote
2answers
174 views

How to display php source code inside a post using visual editor?

NOTE I don't want the php code to be executed, only displayed. I want to display this php code <?php wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); ?> inside a post. I cannot make ...
5
votes
2answers
535 views

Create custom [sourcecode] shortcode, the right way?

What I want to do Sharing code in posts on WordPress is quite a pain with all the HTML escaping to take care of. So, I plan to enclose code in posts within a custom shortcode called [sourcecode], as ...
-1
votes
1answer
650 views

What is the meaning of %s, %1$s etc.? [closed]

From a Q&A Thread I've came to meet with some old things, but I'm afraid, I found myself in a condition that, I still don't know the meaning of them and don't know why to use them. %1$s - (found ...
0
votes
0answers
14 views

Need To Post Unformated Code

Im wanting to use wordpress to share some code snips. However when viewing the posts some of the code tries to format even though its in pre or code tags. Is there anyone way to modify <?php ...
0
votes
1answer
78 views

Wordpress code editor messed up my code!

I just spend a few hours trying to make my code look better. In the past, I did some changes using Wordpress code editor and after downloading these files yesterday, I noticed that code is totally ...
0
votes
0answers
60 views

Sub post not showing in wordpress admin

I am trying to show all the post (including sub post) in wp-admin. but the post which are having parent are not showing in the list of post although the count is giving like 142 post but showing 42 ...
0
votes
0answers
12 views

Add html gadget

How do I add an html gadget in Wordpress? I have a newsletter gadget that I would like to add. I tried their Arbitrary text or HTML gadget, but that did not help. What is Arbitrary text anyway. ...
0
votes
0answers
48 views

Code auto escaping is not working when using short codes

I'm using this ages old, but still well working, plugin (source code here) to auto escape html inside <code>. All is well and good until I tried to use short codes to form the ...
0
votes
2answers
120 views

How to link to a alternative page in CSS

I have a wordpress site and I want to be able to completely change a page that is displayed based on the browser size in my Custom CSS, so that if it is over 1500 pixels it loads a completely ...
0
votes
1answer
161 views

Loop don't work within single.php page

I have this code below within the loop <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="new-posts-form"> <div ...
0
votes
1answer
186 views

How do I reset my footer.php to its original state? (theme: Origami)

I accidentally deleted some codes from my footer.php trying to get rid of the 'Theme By Origami' footer, and now the footer is all messed up. How do i reset it to its original state? I feel so stupid, ...
1
vote
0answers
33 views

Wordpress editor removes all the linefeed characters with WP-Markdown and Syntax Highlighter evolved

I have WP-Markdown and SyntaxHighlighter Evolved wordpress plugins installed. The issue is that when I write the code, and click the "Update" button, I have the code reformatted. [ruby] class Foo ...
2
votes
1answer
269 views

How do i get (unique) page name?

Like from the page of http://localhost/wordpress/about_us/ how do i get only the "about_us" ? Thanks
0
votes
1answer
214 views

Wordpress editor, change code wrap (bbpress?)

I am developing a theme and using jquery prettify to style code tags. Sofar I love prettify, and for the most part wordpress is cooperating. When text is wrapped in <code> tags everything ...
0
votes
0answers
344 views

How to add a class name to the ancestor <li> of a post?

I've asked this question before with a different Question Title over at Stackoverflow. At that time, I was not yet aware that a function of the theme is adding a class name called current-menu-item. ...
0
votes
0answers
32 views

Theme Option is not allowing two advertising for home only and rest of site

My Wordpress Theme(Themforest Hottopix) comes with a "theme options" section that allows you to add an ad on the header 970x90 however I was given two ads that are placed on the same spot one is ...
0
votes
2answers
67 views

random reason on refresh

I am editing the sidebar widgets and have added one for users who are not logged in or registered. the widget requests that users register or login and I am wanting to add a random reason (quote) as ...
0
votes
1answer
34 views

why is markup routinely placed in functions in wordpress?

Here is an exampple from a woothemes theme. I'm definetly not having a go at woothemes - they are a great theme provider with great standards and this sort of thing is fairly typical in themes. why? ...
0
votes
2answers
319 views

Creating a press page for our project

Over time our project got some good press: press releases, interviews, media appearances Now I want to create a "press page" (something like this). Requirements: is easy to update - everyone can ...
0
votes
1answer
183 views

CSS Styling for a Page/ Site made with Pagelines

I know how to change the HTML of page inside wordpress but for some reason I can't find the CSS for the page I'm looking for. I can find a huge amount of code made by Pagelines(Is it in there?). The ...
0
votes
0answers
35 views

Images inserted with HTML

I coded some images each image tag with a new line, so visualy you would have a row of images. When I previewed the page instead of showing me a row of images it showed me a column of images. It seems ...
0
votes
0answers
24 views

Strange behavior when I insert XML code snippet into articles using SyntaxHighlighter Evolved Plugin

I am using WordPress for a technical developing blog. I am using the base WordPress editor to write my articles (not using other plugin) I am using the SyntaxHighlighter Evolved Plugin to enter code ...
1
vote
2answers
72 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
387 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
108 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
65 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
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: ...
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; ...
2
votes
1answer
324 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
255 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
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 ...