0
votes
0answers
3 views

Ajax has stopped working

For some weird reason, the ajax part of my page has stopped working. After messing around with it for some time, I realized that I can make ajax working by enabling wp_debug and having an error shown ...
0
votes
0answers
4 views

Discount From Woocommerce cart

I am new for both wordpress and coding.I am integerating Referrals with woocommerce Subscriptions.Based on the no.of referrals I am discounting the total from the cart.I have written the following ...
0
votes
0answers
5 views

I am editing a plugin to sort list items alphabetically but can't seem to get it working. What am I doing wrong?

I know modifying a plugin is a big no-no. But I'm sure most of you have done a few in a few cases. This happens to be the case. So I bought a plugin for a client to use on their website but turns out ...
0
votes
1answer
12 views

Post data in separate divs with incrementing class using WP_Query

I'm trying to achieve this result (which is the static HTML) and this is what I've gotten so far. Below is the approach I've taken: Created a CPT for 'locations' Created a custom taxonomy 'region' ...
1
vote
0answers
4 views

How can i change Media Library thumbnails for non-image files to include the post title instead of the filename?

Ok so basically we are migrating an outdated custom CMS to Wordpress and all of the files have a corresponding title which is great but Wordpress chose to show the filename, by default, in the grid ...
0
votes
0answers
6 views

How to change/rewrite the lost password url?

I used iThemes Security (formerly Better WP Security) hide back-end functionality to change the login url to /signin however clicking the lost password link /wp-login.php?action=lostpassword now ...
0
votes
0answers
16 views

Combine enqueue js without effecting dependencies

I want to combine little javascript files while keeping other script's dependencies for them. Is there any way? Details: New version of BuddyPress enqueue 6-7 little javascripts: // Legacy ...
0
votes
1answer
10 views

Manually cache a special, non-WP-but-using-WP page (e.g. Ajax results) with W3TC

Under the active theme folder, I have a search-autocomplete.php file which uses various WP queries to create smart JSON results delivered via AJAX to a jQuery UI Autocomplete input field. It's not a ...
0
votes
0answers
11 views

How share wordpress sessions between 2 backends?

I have 2 backends with the same wordpress code. I try to login, but after login load-balanser change backend and the session becomes invalid. I try: session.save_handler = memcached ...
0
votes
0answers
5 views

Plugin to limit a list of tags to one category

I may be posting this query in the wrong spot, I'm prepared to be shouted at :} Looking for a plugin / widget that would present users with a drop-down list of tags BUT only for posts that have the ...
0
votes
1answer
12 views

How to order a list of taxonomy terms alphabetically?

I have the following code to list taxonomy terms in a drop down list. It works great, except the list in the drop down isn't in alphabetical order. How do I modify the code to list them ...
0
votes
0answers
6 views

How does the system know where to get text-string (in different language) from?

I have this code in functions.php in a theme that is used for creating header-titles in different tables $content_prodsection_headers = array(); $content_prodsection_headers['title'] = 'Namn'; ...
1
vote
0answers
8 views

using plugin to add menu item to external page [on hold]

I have a wordpress plugin that is working well so far. The last step for me is to have it create a menu item on the main navigation menu to an external page when you activate the plugin. Not sure how ...
0
votes
2answers
9 views

Update meta_key value for a page

I have inherited a WP site where some home page slides are pulled using <?php $po = get_posts( array('post_type' => 'page', 'meta_key' => 'Home Slide', 'order' => 'ASC', 'orderby' ...
0
votes
0answers
6 views

CF7 skip mail and redirect form to step-2? [on hold]

i am using contact form 7 to save data in a custom db table. But i can't redirect the form to a next step if (($wpcf7_data->id() == 15)) {//STEP 1 $wpcf7_data->skip_mail = true; ...
0
votes
0answers
14 views

How to access a local site without knowing the log-in credentials?

I have an old WP site on my computer in MAMP. I've can't remember the user name or password when using wp-admin Any email I try says not recognized. Is there any way I can get login into the site, ...
0
votes
1answer
15 views

How do I 'rebuild' the WordPress Media library after transfer to new host?

I recently inherited a large site from a developer that vanished. The site has more than 6,000 images. In the pages most of the images are missing, however, they are referenced in the media library ...
0
votes
0answers
12 views

Unit Test ignores stubbed method second time around in a dataProvider

I am writing a sample unit test that checks a title of a post for a token and if it exists add the post to a category. https://gist.github.com/matstars/bebedbacedd7a85d8dc7 In my test for this I am ...
2
votes
0answers
21 views

Can't preview drafts after upgrade to 4.0!

I recently updated to wordpress 4.0. However, when I try to preview my drafts, I receive an error saying that I do not have the permission to do so. I've cleared my cache and cookies and restarted my ...
0
votes
1answer
11 views

Plugin settings are saving but the fields

I'm following @Otto's tutorial on Settings API. I managed to save the plugin settings into the options table, but by any means can't save any fields. <?php /** * Add Settings SubMenu * Thanks ...
0
votes
0answers
9 views

Custom meta boxes adding prefix to first category but not others

I've created a custom post type and added some custom meta boxes using this great resource: https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress The problem, I've found, is that ...
0
votes
1answer
16 views

ordering and optimizing functions

Ive been hard at work trying to build some functions to display products on my site. The prices for these products are calculated based on many variables. I think the first set of functions work, ...
1
vote
0answers
6 views

Passing jQuery into the Wordpress media uploader

In a Wordpress plugin that I am working on, I am using the built-in Wordpress media uploader function ( wp.media ) to add photos. I am using the selection option to pre-select images in the media ...
0
votes
0answers
3 views

Extract custom image URL from category taxonomy

I've attached an image field to the category taxonomy with Advanced Custom Fields which I want to set dynamically as a full width background. I've done this on the category page without a problem but ...
0
votes
0answers
14 views

WP Meta Box Not Saving

I've been trying to get this custom meta box to save but it is not working. I've browsed around but still haven't found a solution that works. function add_link_box() { add_meta_box( ...
0
votes
0answers
10 views

List all posts by year with pagination

Right now I'm using the following code to display all posts by year: index.php <?php foreach(posts_by_year() as $year => $posts) : ?> <h2><?php echo $year; ?></h2> ...
0
votes
0answers
5 views

Default metadata for Custom Taxonomy when using Add New Item on Post Edit

I have created a custom post type, that has a hierarchical custom taxonomy. This taxonomy has extra custom fields tied to it that save to a custom table in the DB. These fields have default values set ...
0
votes
1answer
12 views

Lowest catagory link

I am trying to display lowest child category link.At this point I can only display the child category name but I want it with permalink.So far my approach $categories = ...
-1
votes
0answers
28 views

loop is running one time [on hold]

Hi guys why this loop is running one time. <?php $args=array('post_type'=> 'news'); $myposts = get_posts($args); //print '<pre>'; //print_r($myposts); //print ...
0
votes
0answers
11 views

Filter html of WordPress editor in visual mode only

1 down vote favorite I have done a lot of Googling , but have not been able to figure this out yet. I have used a function in a plugin I am creating that swaps out the file url of any image inserted ...
0
votes
0answers
11 views

Custom call to action

I am trying to develop a simple call-to-action for our marketing group. They want white papers and other information to download once someone has entered their email. My question is, is my code ...
-1
votes
0answers
9 views

Menu upload problem

i try to insert a new menu in my wordpress Woocommerce, but when i'm trying to save it i get the this message Internal Server Error The server encountered an internal error or misconfiguration and ...
0
votes
1answer
8 views

get_terms from registered taxonomies not working

In functions.php I can var_dump() taxonomies like: $taxonomies=get_taxonomies('','names'); echo '<pre>'; var_dump($taxonomies); which give me: array(7) { ["category"]=> string(8) ...
0
votes
2answers
24 views

Getting a custom field in the middle of a loop

is there a way I can get <?php the_field("do_stuff")?> to go in the middle of a multiple loop like this: <?php query_posts('cat=4&posts_per_page=5'); ?> ...
0
votes
0answers
16 views

Wordpress Apply filter in plugin causes 500 internal error

I use the plugin https://wordpress.org/plugins/show-post-in-lightbox/ to display all feautered image of every post on a page. whenver one of these images get clicked on a lightbox will appear showing ...
0
votes
1answer
13 views

get term slug from current posts's custom taxonomy

I've been searching on this topic for 1 hour but I just can't seem to figure it out! Im using this WP_Query to loop trough related posts and create clickable links: <?php $currentID = ...
0
votes
0answers
10 views

WP_EDITOR on Frontend in bootstrap modal doesnt work properly

im stacked on one problem. in my plugin, i open a bootstrap modal and inside it i want to display the defaul WP editor, called by the function wp_editor(). What i get is the textarea with buttons and ...
0
votes
0answers
12 views

ACF Getting first row from repeater field from post object in flexible content

I know the title of my question is a little confusing, so I will first explain what I am trying to do. I have a flexbile content field, where I have made a post object field which is multi select. So ...
0
votes
0answers
14 views

Show Taxonomy content

I've created a Taxonomy called Collections and also have a custom post type called products. I want to show the top 3 categories on the homepage and then when you drill down into each collection ...
0
votes
0answers
41 views

Add input fields to Wordpress search to search custom fields

I have 2 custom fields: first and last. My goal is to add 2 new input fields (first and last) to search their respectable custom field. Here's my form code in searchform.php: <form role="search" ...
0
votes
0answers
6 views

Redirect an old to new permalink not working

I have my old site permalink structure like this /%year%%monthnum%%day%-%post_id%.php since 2010 and now I decided to change server and transfer it on a new one and change the permalink on a much ...
0
votes
0answers
3 views

Extending Walker_Category class

I would like to show category images on each of my custom categories. So far I've managed to echo the image url within the walker class by adding this piece of code into the existing walker_category ...
0
votes
0answers
6 views

Adding Class and div id to wp_list_categories

I am trying to create a dropdown menu for wp header with categories and children as dropdown but cant find a solution, trying to get somethink like this <li class="Main-Cat"> <a href="Link ...
0
votes
0answers
11 views

Storing Facebook page token in the options table

I developed on few wordpress sites, the ability to publish a post or page to facebook with custom values. I am on the process of turning my code into a plugin but I want to make it the good way. I ...
0
votes
1answer
15 views

Ad line breaks in category description via enter

My client wants to ad line breaks in category description via keyboard enter. In the editor the white space is added, but it is not shown on the website. I can ad it with &nbsp; but I have to be ...
0
votes
0answers
8 views

Create subscriber account using e-junkie send generated code

Trying to use e-junkie's send generated code feature to automatically create a subscriber wordpress account for new customers. The code needs to take their information that is passed through after ...
0
votes
0answers
6 views

Redirect all users to previous URL before login, except “contributors”

In one hand I redirect all users to previous URL before login. This is the code: function login_redirect( $redirect_to, $request, $user ){ if(isset($_REQUEST['redirect_to'])){ return ...
0
votes
0answers
7 views

permalink problem in my .htaccess page

Please give me a suggestion for my question. when we set permalink in our site then the .htaccess code is RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
0answers
8 views

Rewrite Urls + Taxonomy combination

I' am trying to rewrite my query urls to something more seo and humand friendly urls. My current state: URL: */text/?taxonomy1=term1 text/(.+?)/?$ -> ...
0
votes
0answers
11 views

How to add author nickname to post permalink urls?

How to add author nickname to post permalink urls? Like: http://mydomain.com/post-title-%nickname%

15 30 50 per page