1
vote
1answer
24 views

Automatically include all php files in a child theme directory

I'm currently using a custom child theme across multiple sites, and would like to modularise particular custom features (e.g. ecommerce) by separating them into individual php files, and including the ...
0
votes
3answers
3k views

Use a different template/theme if mobile only on home page

I have looked around and can not find anything that fully works for my issue: I want to be able to set the home page template on the fly when a user is visiting from a mobile phone but not a tablet. I ...
0
votes
2answers
580 views

Custom registration form in shortcode getting internal server error 500 [on hold]

I created a custom registration form which works fine when used as a custom page template. I needed it as a shortcode so I created a shortcode using the function below /* Custom shortcode */ function ...
0
votes
1answer
244 views

How to add current custom taxonomy slug to body class

My theme uses custom taxonomy called "kbsection" and there are lots of sections set up (instead of categories). There is also a custom post type and the posts are assigned to sections. I need to ...
8
votes
2answers
11k views

Load a script just to custom post type in admin

I have created a custom post type "portfolio" with something like this : $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => ...
1
vote
1answer
1k views

How to link to featured image to media file URL

I have enabled a function when I uploaded an image, it auto create a post with that image as the featured image. Now I wish to link to that featured image to that of the image file/media file URL so ...
0
votes
1answer
529 views

change attachment custom field onChange event

The form is in post creating window. Ajax is posting values, but the values doenst renews. Where can be problem ? Ajax <script> function dynamic_Select(field, aid, value) { ...
0
votes
2answers
87 views

Clone a Post Tite and Custom Field into Custom Post type

I am using Simple Urls to setup redirects on my blog. I am trying to create redirects automatically upon publishing a post. For example, If i publish a post about StudioPress it will be automatically ...
2
votes
2answers
745 views

Multiple files in a plugin

I'm trying to write a plugin with multiple files. I'm sure I did it before without a problem, but now I have the problem in the subject. In the main plugin file I have included a file name - ...
1
vote
0answers
13 views

taxonomy tax-name archive

I am creating a taxonomy $labels = array( 'name' => $name->labels->name, //genre 'singular_name' => $name->labels->singular_name, //genre ...
0
votes
1answer
30 views

How to change WordPress embedded player size or show just the play button

Even though I tried to alter the width of the embedded player size [embed] which looks this using [embed width="50" height="50"], but no matter what value I use it will not change the size. ...
0
votes
2answers
2k views

Uploaded images do not show on localhost

I'm working with Wordpress 3.3.1 on a local installation. I've uploaded an image file and it doesn't show up. The base directory is a symbolic link /var/www/wordpress/ that leads to ...
0
votes
1answer
423 views

Get current_parent_category in a loop or Cat ancestor- big problem

Im having some trouble since a week now . .. I'm having a bad time with that ! I explain my situation: I have setup a style for post category. (a background-color and a small image background). ...
0
votes
1answer
32 views

How to add a caption to an image attachment in a file list?

I've tried various things and can't get the captions to show up in my gallery. I'm using CMB2's file list to output image attachments. I hope this question is pertinent enough to this forum as I think ...
0
votes
0answers
9 views

Get posts of a custom taxonomy, then show terms of another custom taxonomy

I'm working on a page that show a lot of products. My structure is Product (custom post type) -->Brand (custom taxonomy) ------>Brand A (custom term) ------>Brand B (custom term) -->Department ...
0
votes
1answer
421 views

Wordpress creates unused (unregistered) image sizes

I have a news blog created on WordPress. I've set up WordPress to create 3 resized versions of images when uploading them. 315x215(featured image with cropping option enabled) 620x (to create images ...
2
votes
0answers
11 views

Login email after registration never sent or received

On my site, after a user registers they receive an email with an activation link. When clicking the activation link, sometimes the page doesn't load, sometimes it does (usually if I click the link ...
0
votes
1answer
633 views

How to add a full edit link to front-end editor?

I would like to add a full edit button to the Front-end Editor plugin. It's currently like this: [EDIT] Text text text I would like to make it like: [EDIT] Text text text (enables front-end ...
-1
votes
0answers
14 views

Attachment not working with Simple Job Board [on hold]

I want to send the uploaded resume with HR notification mail. I am using Simple Job Board Plugin. To attaching resume in HR mail I find this article and tried with following code in function.php // ...
-1
votes
1answer
479 views

How to redirect to 404 page not found page

I have created a custom template for a custom post in a childtheme. if some conditions are not satisfied i want to redirect the page to 404 page not found page. if(false) { //redirect to 404 page ...
0
votes
0answers
9 views

How to Add 'Post Categories' to the Dashboard Sidebar

I'm currently working with a company to make a few basic tweeks to their WordPress site and I noticed that they have this on their sidebar: I am looking particularly at the "Clients", "Offers", ...
2
votes
3answers
85 views

Are php template shortcodes ok?

Can I just get everyone's ok that using shortcodes embedded within templates is the 'correct' thing to do? I've tested them and they work just fine - but I just wanted everyone's thoughts. Thanks ...
1
vote
1answer
615 views

Why can't the WP-CLI installer find my php.ini?

I am trying to install WP-CLI on my Mac using the standard installation command (found here: http://wp-cli.org), yet I am receiving the following error message: #!/usr/bin/env php Some ...
0
votes
0answers
22 views

Need help running php on page

I need help running my PHP code on a WordPress page. I’m using a plugin to run my PHP code. This is a code I'm trying to run: <?php define('STEAM_CONDENSER_PATH', dirname(__FILE__) . ...
0
votes
0answers
10 views

Linking Page, Posts & Category together

I want to create a page named Works with the built-in template called Project Listing. And have to make individual posts in the page Works. However, I am not able to do it. Though I can create the ...
3
votes
2answers
3k views

Insert query inserts 2 entries, should insert 1

I've written a small posts by views plugin, well at least started one. My tables are set up but when they are updated the code adds 2 entries into my table when a post is loaded and views are ...
2
votes
1answer
16 views

How to order category.php loop by 'meta_value'?

So I have a basic loop on category.php that displays all posts from the specific category, like this: <?php if (have_posts()) : while(have_posts()): the_post(); ?> <a href="<?php ...
0
votes
0answers
7 views

Attaching taxonomy data to with wp_insert_post

By WP User Frontend I create a registeration form with some checkboxes, and use wp_insert_post and update_user_meta for create a new post (post type pavilion) on user registration.I want when checked ...
2
votes
1answer
24 views

Filtering comment permalinks when a condition is met

I can't figure out how to filter the comment permalink on certain WP page that I use like this: if(condition is met) { (filter the comment url) } ...so that all the comment permalinks inside the ...
-2
votes
0answers
9 views

Show images on mobile checkout storefront woocommerce

could someone tell me how to get my images to show on the mobile version of my sites checkout? I worked before and now does not. Thanks. the website is hemingwayscatboutique.com it is a ...
1
vote
1answer
605 views

How to get Login Error messages on a custom template

I want to display login form and process the login on the same page, so that if there is any login error it should display the error messages on the same page. I have added this function: ...
0
votes
1answer
30 views

How to get post with slug and exclude categories

I want to do a query to get posts with a slug and category__not_in. Here's what I do: $query = array( "name" => "test", "category__not_in" => array( 15 ) ); query_posts( $query ); ...
-1
votes
0answers
7 views

WooCommerce registration fields sanitized? [on hold]

I was just validating my form input for the extra fields I've created in the WooCommerce registration, and I want to know if the default fields (email and password) are sanitized by default or not? I ...
0
votes
1answer
863 views

Custom WP Query from meta_value stored as serialised array

I'm using a Magic Fields 2 multicheck box to store Services which can be assigned to Case Studies. The data is stored as a serialised array in WordPress, and I need some help to extract the "related ...
3
votes
1answer
299 views

Save Press This Posts in a Custom Post Type

I'm wondering, is there a way to modify the "Press This" bookmarklet so that posts are saved to a custom post type instead of to a post. Looking through, it doesn't seem as if there are any actions ...
0
votes
0answers
14 views

Not able to access wordpress posts using REST API

I am working on mobile application for my website. I am able to access the URLs from postman client but when i try to access the same using my mobile app client then i am getting 401. I have using ...
-4
votes
0answers
15 views

woocommerce coupon code Apply on product page..? [on hold]

I am trying to apply coupon code on the product page. But there are not apply on the exact way, like it's apply but already add in the cart. I need to first validate coupon code then apply on the ...
3
votes
1answer
13k views

Add “Logout” link to navigation menu

How can I add a link to the primary navigation menu with the class="right" attribute? I tried to add a static link to example.com/wp-logout.php?action=logout but that leads to a logout confirmation ...
2
votes
2answers
880 views

Using plugin functionality in external php script not working

I am encountering a strange problem which I couldn't solve so far. I'm calling a .php script via cronjob (Debian/GNU Linux). To use wordpress functionailty I added: define('WP_USE_THEMES', false); ...
3
votes
3answers
94 views

PHP Script to Download Latest PLUGIN Version

I use the following code in my PHP script to automatically download the latest version of WordPress... $wordpress_zip_file_url = 'https://wordpress.org/latest.zip'; file_put_contents("wordpress.zip", ...
4
votes
1answer
31 views

Multisite - Keep users logged in only to their site

How can we keep users logged in only to their site and not to entire network? If they visit other sites on the network I want to be the same as they visit any other typical website on the internet.
7
votes
1answer
72 views

Multi user site and image captions

On multi user sites when authors select images from the media library they can choose images that other authors have uploaded. The problem is that they can edit the caption and it changes it for both ...
2
votes
1answer
675 views

Shortcode in AJAX popup

I am trying to use a shortcode from Ultimate Facebook plugin to display a FB connect button in an AJAX popup and can't seem to get it work properly. I searched and used the solution given by djb in ...
0
votes
2answers
18 views

How to put articles under a /blog directory?

I have a homepage, work (as parent pages) and several pages (as child), but when it comes to articles, I can't choose the relation between them and the page Blog. Resuming, I can choose the hierarchy ...
0
votes
1answer
31 views

How to get post attachments in gallery post format template

I'm doing a WordPress theme, and I get stuck on one thing. As you know, the post-format in WordPress has different types of formats, I did all the types except the gallery slideshow. What I need, for ...
-3
votes
0answers
28 views

Black bar under picture [on hold]

I've uploaded an image and am getting a black bar underneath the picture when I view it in a post. This is happening regularly and I've no idea why. e.g. Any idea what the problem might be? ...
-4
votes
1answer
44 views

Best WordPress Contact form plugin [on hold]

Please suggest me best WordPress Contact form plugin.
1
vote
1answer
683 views

$wpdb->get_results returns empty but value exists

this is my first question here. More then 5 years working with Wordpress, I always find the right way through the Google, but in this case I did not even know what to do, I really stacked :( So ... ...
0
votes
2answers
2k views

Override private status - Enable users to read private posts

Hidden private posts for not logged in users The private posts are by default only visible when logged in. Override, show private posts for everyone Is there a clever way to override this? Make it ...
-3
votes
0answers
15 views

What is the best way to create event manegement solution? [on hold]

Can anyone advise me how to quickly create a solution for management events and sale tickets? Make changes to the existing plugin (the best that I found is opentickets but there're too much code) or ...

15 30 50 per page