Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

-3
votes
1answer
43 views

Remove price on wordpress product pages [on hold]

i am relatively new to WP and have had a problem for days now, i am building a site with lots of price variations, but the annoying thing is i have managed to show only the lowest price on the shop ...
0
votes
1answer
12 views

Where do I add an action hook & callback in my theme?

Another answer suggests to Hook into the action wp_head but I am a newbie and I do not know where I am supposed to add the code provided. add_action( 'wp_head', 'wpse_91073_noindex' ); ...
0
votes
2answers
105 views

How to display posts of specific category using a custom Query in WordPress?

Hi I want to display a specific category from a custom query in WordPress. My code works fine and it gets the latest 4 posts, but what I want now is to retrieve a specific category. My code is below ...
0
votes
2answers
26 views

Code to Show for One post only in head

I want to add this code only for one post before </head> <link rel="alternate" hreflang="en-gb" href="http://abc.com"/> What code shall i use?
-2
votes
2answers
109 views

CSS code for “inserting a custom post divider” after each post

I want to add a custom post divider to separate my posts. I'm using the Enfold theme in WordPress.org. I've searched for the answer to my question but I don't understand the coding language. I ...
0
votes
1answer
36 views

WP List Pages - Add Title Attributes to Anchors

Using the default wp_list_pages() is there an easy way / filter to add title attribute to the anchors? Right now it just spits out the anchor with no title attribute but I would like to add it on ...
1
vote
0answers
27 views

source code: WP_INSTALLING vs. WP_SETUP_CONFIG in setup-config.php

I am trying to make sense of the wordpress installation process. The file setup-config.php under wp-admin has the following. I want to know what the difference is between these two variables, why both ...
0
votes
1answer
28 views

Add space to the end on a widget

I have a widget that when stacked with another the out put from my widget to the next sit on top of each other. I tried echo <br> but that gives me a fatal error. Is there any other code to add ...
1
vote
1answer
107 views

Open posts in editor in the 'Text' mode by default

I have a few posts where there are some code segments. When I try to make small edits in the post, it opens in the 'Visual' mode and all the non-alphanumeric characters (e.g. >) are converted to ...
2
votes
1answer
250 views

Has anyone tried putting PHP ActiveRecord on Wordpress?

I have worked with Ruby on Rails and I was looking for some code that did something close to the wonderfull RoR's ActiveRecord. I stepped by this site. Its PHP-ActiveRecord! I found it amazing, and ...
0
votes
1answer
39 views

How can I optimize this code? [closed]

I have an Advanced Custom Fields Checkbox that I'd that I need to do some checks on. If a checkbox is ticked in the back end, it outputs an appropriate image on the front end. I've got some code that ...
0
votes
1answer
99 views

How To Add Perfect Apostrophe And Quotation Mark In WordPress Posts?

I have a blog at www.exeideas.com where I am sharing codes snippet too. I am new to WordPress and migrated from Blogger. So now my all codes shared in posts stop working. When I check my codes then ...
0
votes
0answers
12 views

Code formatting: Gists vs Embedded

It seems that there are at least a couple different methods of working with code in WordPress entries and posts: GitHub Gists (via the Gist Shortcode plugin, etc.) Inline formatting in a <pre> ...
0
votes
0answers
22 views

Show recent ads from certain categories

I ask you to help experts, the problem is: I'm using a template classified, are shown on the home for the latest upload, but I would like to show ads in different categories. Let me explain, I ...
0
votes
1answer
50 views

widget that will do shortcodes that user inputs

I have this widget that im working on and it allows the user to input a shortcode and it will display it in the sidebar. But its not working right. I can input the short code but it has no output. ...
0
votes
1answer
13 views

A good way to include snippets of code in both posts, pages and Event Manager Template files?

(I am not sure if I am phrasing this correctly, so please bear with me and be kind. ) I have a setup where the same information need to be included in both pages, and individual Events (Custom post ...
1
vote
1answer
106 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
105 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
106 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
467 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
68 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
268 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
34 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
88 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
50 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
76 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
81 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
88 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
1answer
49 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
54 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
313 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
699 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
vote
1answer
3k 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
16 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
90 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
70 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
64 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
173 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
167 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
385 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
44 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
542 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
270 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
482 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
33 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
73 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
36 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
762 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
214 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 ...