The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

0
votes
1answer
167 views

Cron job to call php to email last 24 hours posts

We have been trying to call via CronJob a PHP script that will email the past 24 hours posts using the 'post_type' = 'reservations' filter. <?php query_posts( array( 'post_type' => ...
2
votes
5answers
4k views

Check if current page is the Blog Page

I'm new to Wordpress. I need to check in header file if current page is the Blog Page? I checked but I can't find the way. Help me, Pls.
0
votes
1answer
140 views

Could use some help with Shortcodes

So I am starting with shortcodes and this is my first time trying to make one, I am using it to make css/js tabs for information and basing off code I got from themeforest.. So I will do the best to ...
0
votes
1answer
17 views

How can I tell which of my pages are single-view pages?

I am trying to understand what the is_singular() function does. And I found this definition: is_singular() tag enables you to target single-view pages, regular page pages, and attachment pages But ...
0
votes
2answers
101 views

How to integrate noimage picture in this code

How can i integrate a image if there is no attached image? I'm using this code with success to integrate no-image picture if is no picture is attached to post. <?php if ( ! $img = ...
0
votes
2answers
516 views

How make a php script run only with wp-cron

I have a php script that executes a function and creates an xml file with results. I want this script runs only once daily and i'm using wordpress cron to do this. Problem is this script always runs ...
1
vote
1answer
293 views

How to add date to navigation bar

I've created a new navigation bar on this site: http://www.tomorrowstrends.com/ I'd like to add the date on the right hand side (on the grey menu below the blue one). I thought I could add this to ...
1
vote
1answer
208 views

WordPress Custom Fields (Checkboxes with multiple values)

I am currently using a custom post type, with a custom field that is a checkbox. There are multiple values in the checkbox including: Laptop, New, No-Marketing-text and several more. If ...
0
votes
1answer
35 views

Xml output not places where i want

I have a script that checks status (daily with cron) of some sites and write result in a xml document. Xml is like this : <?xml version="1.0" encoding="UTF-8"?> <xml> <sites> ...
0
votes
1answer
45 views

Attaching images to posts manually (i.e. with custom code, without the use of an API)

I am working on mobile API for a WordPress site. The API is written in PHP and provides methods actions such as creation of a post. Now, I can create a post with one image (thumbnail) of the post. ...
2
votes
1answer
843 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
0answers
36 views

I am trying to call external database recieving error

My case is different from the case defined here .. I am calling an external databse in my functional.php file by this method function newdata() { $newdb = new ...
1
vote
1answer
328 views

Custom profile field with birthday. Troubles with <select>

I made custom profile fields for birthday data. function my_user_field( $user ) { $birthday_day = esc_attr( get_the_author_meta( 'birthday_day', $user->ID ) ); ...
2
votes
2answers
218 views

is there a simple way to list every templates / php files used to generate a specific page?

To customize a theme , it is not always easy to trace every files that are used and find out which one do what . For example i' like to find out how my menu is generated so i can add some conditions ...
1
vote
2answers
42 views

Menu Limitations

I am coming here for advice mainly, because I am stuck on what to do next. Within my latest project, I am using Wordpress at the backbone, as a fully fledged CMS system. I have styled every single ...
0
votes
1answer
141 views

WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]

I have the following function that adds a column in the Sales Log so that I may show the Order Notes. Adding the column is good and showing the id of each item ($item->id) as test is good. Where I am ...
0
votes
2answers
67 views

Javascript not loading on certain page

My Javascript doesn't seem to get called on this page called news, this uses the default post custom type in wordpress. Every other page that uses's this javascript is a custom post type I've ...
1
vote
1answer
147 views

Wordpress PHP plugin - Settings page error

Writing a PHP plugin for Wordpress. It was an external PHP script. But now I'm having a problem. When I click submit on the page it redirects saying there are no permissions to go to that page. Edit: ...
1
vote
2answers
174 views

two columns of posts on homepage, one of them “favorites”

I'm using a child theme of Twenty Twelve in wordpress. Here's where I am developing the site: http://internalcompass.us/castle/ You'll notice the two columns of posts on the homepage. I have one ...
0
votes
1answer
223 views

Location of core code for database connection and get_header

I understand WP well enough to create a custom theme at a basic level, but have no experience with the core code. I've also just finished a book on basic php and mysql coding. I'd like to look 'under ...
1
vote
1answer
94 views

showing 2 prices wholesale and normal

am using the plugin Ignitewoo Wholesale price and have coded the single-product page to show two prices with the idea of one being the wholesale price the other normal retail price but atm its showing ...
0
votes
1answer
2k views

conditional statement for custom taxonomy

Struggling to find out how to achieve this, if it is at all possible. The equivalent of is_category but for a custom taxonomy I've set up. The taxonomy category if which being Taxonomy Name with 2 ...
0
votes
2answers
111 views

JS completely stopped loading but Files are found

Basically I've enqueued all of the files I need and can see there been picked up in the browser but for some reason none of them seem to load or function correctly and I get no errors in the console. ...
2
votes
1answer
113 views

Put a link to a category round a hard coded A HREF

In my footer I have hard coded the links and would like to link some to there category, I could just copy the full URL to it and paste in the href="" but I would rather call it using php. My ...
0
votes
1answer
219 views

Next Previous Post in wordpress with previous / next link with title?

I recently tried the previous post and the next post button link. I do that with image in the left and right side of the site.Its working perfect.But i didn't know how to do this For Example: ...
0
votes
2answers
74 views

How can I order metaboxes in my posts in WordPress?

hello i did add a custem filed and this is my code add_action( 'add_meta_boxes', 'cd_meta_box_add' ); function cd_meta_box_add() { add_meta_box( 'my-meta-box-id', 'المعلومات الرئيسية لفلل مشروع', ...
0
votes
1answer
35 views

Custom fields randomly stop working

For some odd reason custom fields keep randomly stop working - they're working one minute, then not the next and i do not understand why. The post, meta names and values are all still active - nothing ...
1
vote
2answers
471 views

Category Thumbnail Display - How to display ONLY the main Category

I am using the eList wordpress theme. Now on the main page, there is a thumbnail display of all the categories listed. Now, on the theme you will see that they have no sub-categories under the ...
0
votes
1answer
152 views

Getting “Invalid argument supplied for foreach()” Warning

I am on the last step in a tutorial that I followed here , called "Using the data". I tried using// $album_repeatable = unserialize($post_meta_data['album_repeatable'][0]); echo '[ul ...
0
votes
1answer
635 views

Add number in increment of one to DIV ID

I'm using a shortcode to display a custom post type. The shortcode contains an attribute to display only posts of a specific category within the custom post type e.g. [faq category="travel"] For each ...
0
votes
1answer
96 views

Cannot access empty property error in Advanced Access Manager

As explained in the reply of this post by the Advanced Access Manager's author I've changed the current getCurrentUserRole function in the path /wp-content/plugins/advanced_access_manager/module with ...
1
vote
2answers
150 views

ajax, right way to do it and make it works?

I'm new to wordpress but have knowledge in php and javascript. I read a lot of blogs about ajax call in wordpress. I also read some posts on this forum. However, I still have some difficulties making ...
0
votes
2answers
31 views

Deleting Certain terms from appearing on the front end as links

I've put some thought into this but Can't really figure out what direction I take in getting rid of certain terms in my testimonial_category called 'home', 'homeone', hometwo. I only want to stop ...
0
votes
1answer
112 views

the_post_thumbnail unless video id is added

I have 2 choices on the edit post page to insert an video ID from either vimeo or youtube. The user needs to select, with a select field (channel), if he wants to embed video from one or the other. ...
1
vote
1answer
918 views

Filter Select results based on selection

I am trying to filter which job results are rendered to the page whenever the user changes the select item on my form. The select items are dynamically populated by the code below which assigns them a ...
0
votes
1answer
170 views

get_category only returning details for 'uncategorized'

I'm using the ACF Taxonomy field add-on to select a category and (hopefully) return details for that category, e.g. slug, title etc. The custom field get_field('category_test') returns the category ...
3
votes
1answer
177 views

How can I import a class privately into a plugin?

I've written a Wordpress plugin that makes use of a simple controller/templating library I have authored, to separate out business logic from presentation. I have a (slightly theoretical) query about ...
0
votes
2answers
138 views

Creating a function that sanitizes the custom metabox excerpt

I'm still getting to grips with functions and experimenting with different php functions. I've created a function what I want to use in sync with my custom metabox excerpt. It will basically sanitize ...
1
vote
1answer
861 views

Integrate WordPress in Yii

I'm developing a web application in Yii, now the client wants to integrate WordPress in it so he can manage contents on his own. So how can I integrate WordPress in Yii?
0
votes
1answer
59 views

Wordpress Website Featured Image Replacement Issue

Im working on my Wordpress website, and I'm having an issue with the page template inserting the "Featured Image" at the top of the page. I've isolated the PHP code that controls this. $thumb = ...
-1
votes
1answer
128 views

php nested IF statements to hide content (possible syntax error) [closed]

I cannot see what is incorrect here, I'm trying to hide an entire element if all (and some) options are empty, but it is hiding everything even though at least options are filled in. My code: ...
0
votes
1answer
37 views

Custom Post-type not returning the right child_of

Situation I am using the Advanced Custom Fields plugin to give Custom Post Types a checkbox. If this box is checked, it should be returned by this Query. The Query works this far. The issue The ...
0
votes
1answer
145 views

Select Menu for Custom post Type does not save

I posted a discussion on CSS-Tricks the other day. Explaining that my Videos were not displaying on my Video page from my custom post type that I created using this tutorial. I thought I fixed the ...
0
votes
2answers
106 views

How can I allow for the password protect feature to allow visitors to enter any number at all?

I am a beer distributor and I need site visitors to enter their license # on certain pages but there is no way for me to know all of the licenses in the state. I am currently using the default ...
-1
votes
1answer
135 views

Category slug inside another php code

I'm using this code to get category slug on categories archive page outside of the loop: <?php $cat = get_term_by('name', single_cat_title('',false), 'category'); echo $cat->slug; ?> And I ...
1
vote
4answers
241 views

How to run multiple websites from single WordPress setup

I want to create a website like visahq.com in WordPress, actually visahq.com has multiple websites like visahq.in for India, visahq.ru(will be shown in Russian) for Russia etc. and each TLD has ...
0
votes
1answer
422 views

Can't upload files

I've been developing a wordpress website (with a custom theme) for a month. Today I wanted to upload an image to a page and I got a message saying there was an error and I should try again later. I ...
1
vote
1answer
103 views

How do I test PHP files in WordPress?

I've downloaded a Wordpress theme, but I want to edit it before uploading it to my live server. I read I need to run a server in order to test the PHP files, but I don't know what to use in order to ...
4
votes
2answers
6k views

WordPress PHP version requirements

PHP 5.5 has been released recently. In the same time has been announced that PHP 5.3.x branch won't be supported anymore after 5.3.27 will be released. However WordPress requires PHP version 5.2.4 ...
0
votes
1answer
284 views

Custom field within shortcode

I'm currently using the 'WP Simple Paypal Shopping Cart' plugin to get up a simple paypal e-commerce site, it's super easy to use, but to save the client having to write shortcode, I've set up custom ...