0
votes
2answers
57 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 ...
2
votes
1answer
192 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
0answers
96 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 ...
1
vote
1answer
417 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
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
85 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
vote
2answers
300 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 ...
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
69 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 ...
2
votes
1answer
494 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
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
684 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
772 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 ...
1
vote
1answer
72 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 ...
1
vote
1answer
320 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 ...
1
vote
1answer
79 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
114 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 ...
0
votes
2answers
547 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
318 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" ...
1
vote
1answer
171 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 ...
1
vote
2answers
105 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
45 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
2k 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
1answer
534 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 ...