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

learn more… | top users | synonyms (1)

0
votes
2answers
242 views

Permanently remove first image from posts

I have around 2,500+ posts on my site where I've inserted images using the traditional method into the post content itself. In upgrading to a different theme, the single post page now displays the ...
0
votes
1answer
30 views

How can I alter this code to accept a slug as well as an ID?

This code is from the codex. /* == If In Parent Category... ==============================*/ if ( ! function_exists( 'post_is_in_descendant_category' ) ) { function ...
0
votes
0answers
92 views

Ajax contact form

I have a custom contact form that I am trying to process via Ajax. I am a bit newbie in Ajax and more using it on WordPress. I have built it but it doesn`t send the email and retrieve "0". Php ...
0
votes
1answer
57 views

“if parent category is” conditional?

I searched through the codex but couldn't find anything helpful. I tried the code below but it didn't work. The default sidebar still shows up for all category pages. <?php ...
0
votes
1answer
54 views

echo variable containing html and the_permalink();

I'am trying to echo a vriable, but the permalink does not work as clickable button. The permalink just displayed outside the button. Here is my code: $perma = the_permalink(); $valid = '<button ...
0
votes
1answer
32 views

Php conditional help needed

I am trying to add conditionals for authorship to show for posts on a specific author id. Would appreciate if someone could give the following a quick look over <?php if is_author ('2') AND ( ...
0
votes
1answer
83 views

Search in particular category in wordpress

I am currently using the JSON API to get the data from wordpress http://wordpress.org/plugins/json-api/other_notes/ The plugin helps to retrieve the wordpress post data in JSON format I notice that ...
0
votes
3answers
536 views

Parse error: syntax error, unexpected end of file

I am getting this error after loading my php page: Parse error: syntax error, unexpected end of file in ...
0
votes
3answers
49 views

Permission functions within wordpress

I'm currently developing a website and am exploring all possible options to restrict file viewing. I'm trying to find a way where I can load php files like my theme-options.php and cpt.php without ...
0
votes
1answer
60 views

Php file that doesn't recognize wordpress functions

I have a custom contact form that I am trying to process in other file: The form: <form method="post" action="<?php echo get_template_directory_uri() . '/templates/contact.php' ?>" ...
-1
votes
1answer
52 views

echo vs output variable [closed]

Someone once told me, that it is good for performance, not to open and close php tags and use echo all the time, like that: <hgroup> <h1><?php echo getHeading1(); ?></h1> ...
-1
votes
1answer
138 views

Excerpt all post content Content Same Size without word cutting off

On my category page there are list of 24 posts with title and excerpt content. To display specific lengths of content, I am using substr function. Now the issue is that each post excerpt content are ...
0
votes
0answers
39 views

Problems With Query and/or Template Part and/or PHP

I'm trying to show only the last article. I made content-latestnews.php and it worked before meddling with queries. Template part was shown, but after I tryed to show the actual content it would show ...
0
votes
0answers
41 views

Widget editor not displaying in Dashboard

I'm not sure if this is because of the new 3.9 update, because I haven't had to mess with any widgets in a while, but my active widgets won't display in the editor anymore. I've uploaded a screen ...
0
votes
1answer
53 views

Adapting a php array to WordPress

The guys over at the other Stackoverflow said I should post this here. I've been reading and tweaking code for three days and can't figure this out, because I'm new to php. The developer that wrote ...
1
vote
1answer
51 views

How do I extend one plugin I'm writing with another I'm writing using classes?

I have a set of plugins that do different things. I'm wanting to write a plugin with a class I can extend in each of my custom plugins to meet a common goal. In my "socket" plugin I have something ...
0
votes
0answers
44 views

Splash pages on a high traffic site

Could use some advice here. We have a fairly high traffic site web site using WordPress. Currently we have two VPS servers managing the site, one that holds WP, one that holds MySQL. The WP servers ...
-1
votes
0answers
37 views

Enable Woocommerce chart, price and buying functions if only user is specific role, otherwise use as catalog [closed]

I would like to make a e-commerce site that use as catalog for visitors or users that less than specific role capabilities. Eg: if i enable the woocommerce for Editors than editors and above will be ...
1
vote
0answers
52 views

Configuring a meta query with multiple post types that have the same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback. I have two custom post types called "Clients" and "Projects" and they each pull information from one ...
1
vote
1answer
66 views

Apache Fallback instead of add_rewrite_rule

My requirement is to do SEO Friendly URL for an existing site in Wordpress. For example, Current URL: http://test.com/test/?pid=19971 that is the page "test" is rendering the data from some custom ...
0
votes
1answer
67 views

Different layout on search page depending on category post

I would like to display different layouts for post with different categories on the search page: I tried with this code: <?php if(isset($_GET['the_category'])) { $type = ...
1
vote
1answer
127 views

apache cpu over 70% on localhost

i'm running a number of WP sites on my localhost WAMP on w8. I started to work on a new site, using Sass and Zurb Foundation using this template: http://jointswp.com/. the problem: During my work, ...
0
votes
0answers
54 views

Display a query with multiple post types and same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback in Wordpress. I have two custom post types called "Clients" and "Projects" and they each pull information ...
0
votes
1answer
86 views

Set cookie for visitor

I'm writing a new plugin that will allow visitor to vote. After a visitor rated a post, I'd like to block double voting. I think the better way to do it is using cookie, but of course I can't insert ...
1
vote
0answers
224 views

Single Product Navigation within Category for WooCommerce

I'm working on a website for a client who would like to have product navigation on each single product page. The navigation will go through each product within the category and when it reaches the ...
2
votes
0answers
158 views

Display a query with multiple post types and same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback in Wordpress. I have two custom post types called "Clients" and "Projects" and they each pull information ...
1
vote
1answer
102 views

Show full posts in archive

I have an issue where I need to display the full posts in my archive page. E.G. I have >two posts and I would like to have EACH of them displayed in full in the archive page. Thanks! How would I do ...
0
votes
1answer
27 views

How to show part of the_content?

i wanna show 20 chars of the_content i tried this but doesn't work for me . <?php $content = ''; $content = the_content(); $count_content = strlen($content); if($count_content > 20 ) { ...
1
vote
0answers
102 views

add_theme_page to add_menu_page theme options convert

<?php /** * ILC Tabbed Settings Page */ add_action( 'init', 'ilc_admin_init' ); add_action( 'admin_menu', 'ilc_settings_page_init' ); function ilc_admin_init() { $settings = ...
1
vote
0answers
26 views

how to enable plugin menu on subsite of wordpress MU [closed]

My problem is I already have one MU site and I want to give my user access to enable or disable there network enable plugin. Like the default appearance menu. Please guide me
1
vote
0answers
25 views

FOUND_ROWS() returns maximum rows in table [closed]

I am pretty new to word press, but I am not understanding what I am doing wrong. According to this tutorial (http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows) the ...
1
vote
2answers
309 views

How to upload a media file via FTP and then create an attachment post with it?

I need to upload a very large video. I can not upload it via the built-in uploader since my upload_max_filesize is set to just 2M and I'm unable to override it (I've set the upload size to 50M and ...
0
votes
1answer
66 views

Deactivate a plugin on wp version

I've creating a theme options page at the moment and was playing around with this function deactivate_plugins() I'm running wordpress 3.8.3 so running this code in my plugin should uninstall it. ...
0
votes
1answer
578 views

Wordpress with php 5.5 and zend opcache

I currently updated/upgraded my php to 5.5.11 and want to use the opcache that comes with it. I enabled the cache and added a few settings to php.ini zend_extension=/usr/lib/php5/20131313/opcache.so ...
0
votes
0answers
68 views

How to separate HTML and Wordpress files

I want to separate the HTML and PHP code so that the HTML guys can easily work on their files without disturbing the PHP code, but couldn't find any proper solution or Start point to begin. Please ...
1
vote
2answers
136 views

Create Logout Link Wordpress Admin Menu

I'm looking at creating a Logout link in the Wordpress admin menu that when clicked the user is logged out immediately. I don't want the Logout link to be a submenu of an existing menu, I just want ...
1
vote
1answer
68 views

Making Quote Plugin more efficient

I've been working on this plugin the past couple of nights and have been jotting down idea's of how to improve it. My knowledge of php isn't the strongest and I'm learning as I go along most of the ...
0
votes
1answer
51 views

how to add a div inside wp_page_menu

Right now I'm using the <?php wp_page_menu('menu_class=nav'); ?> function, which gives this result: <div class="nav"> <ul> <li class="page_item ...
0
votes
1answer
58 views

Saving an array to get_options

I'm trying to save an array to get_options in wordpress, I'm aware that I don't have to serialize the array due to get_options doing that. At the moment I don't get any success of failed message upon ...
0
votes
1answer
42 views

Get rid of this Strict Standards warning [closed]

I'm trying to get rid of this warning from my wordpress installation. Strict Standards: Only variables should be passed by reference in xxxxx on line 67 The line with the "faulty code" is this one ...
0
votes
1answer
23 views

Permission error on plugin save

When I pass a quote to the input field and save it I get this error message in wordpress - I'm using the latest installation version. Error "You do not have sufficient permissions to access this ...
0
votes
2answers
70 views

Duplicate domain database to local - How?

I've noticed that my process is rather slow and i'd like to speed it up. I want to be able to duplicate my database from my domain which is blueharlequin.com and work locally thus speeding up the ...
3
votes
1answer
1k views

Allow HTML in excerpt

Here is my excerpt code. // Generate custom excerpt length function wpbx_excerpt_length($length) { return 300; } add_filter('excerpt_length', 'wpbx_excerpt_length'); How do I allow html like ...
0
votes
1answer
452 views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
1answer
42 views

Query seems to be duplicated

I'm just hit a development brick wall and can't seem to find a solution to this problem. I've running two WP_Query's the aim is one displays premium stockists and the other one displays the none ...
1
vote
1answer
43 views

Wordpress Scripts Being Loaded in Footer

I've bought a theme for a Wordpress site. I noticed that the theme author has added the javascript to the footer for load time, but as I use Gravity forms, I understand that some of scripts need to ...
1
vote
1answer
29 views

Correct folder permissions?

I just recently installed PHP and wordpress on our coldfusion box and wordpress is throwing me an dialog saying I need to input FTP information so wordpress can alter the files. I read up on this and ...
0
votes
1answer
117 views

Troll the hackers by redirecting them

My website is getting somewhat popular, and with the it's increasing popularity there's an increase in the hackers. Last night I visited my security logs and found that everyday approximately 10 ...
1
vote
0answers
70 views

Add .htm extention to a custom taxonomy

I need to add '.htm' to all my urls on a new site - client requires that, as I am converting a old static site into WP. (I use Remove Taxonomy Base Slug to hide the slug of my custom taxonomy "topic" ...
1
vote
1answer
23 views

Why do Wordpress rewriites seem to work differently for posts vs pages?

I am creating some simple rewrites in my functions.php file in my WordPress installation: add_rewrite_rule('product1/faqs/?', 'index.php?name=product1-faqs', 'top'); I've noticed that if you hit ...