1
vote
0answers
14 views

Reset Undo on the tinymce editor

I have one editor where I switch between content in one editor, and what I want to do when I set the new content, I would like to reset the undo possibility. I have read on this site ...
1
vote
0answers
15 views

Which ID does WordPress actually use to display published/drafted posts in preview mode?

I can identify if in preview mode or not easily by calling is_preview(). I can also get the id of the post being previewed by calling get_the_ID(). The return value of the get_the_ID() is not ...
1
vote
0answers
65 views

meta_value_num not ordering all items

I am using meta_value_num to output a list of items in order by a custom field. The custom field value that is being passed is 1, 2 ,3 or 4. The order works for the first 7 items but after that they ...
1
vote
0answers
23 views

How to have yearly versions of same site with different content (like yearly conferences)?

Past year I build a site for a yearly conference event. http://reunionterapeutica.gtpbarcelona.com/ The 2015 event has done yet. Now the client wants to archive the 2015 event content in a folder or ...
1
vote
0answers
26 views

How to run subversion and staging environments when running Wordpress

I come from a .NET world with custom solutions, where I am used to multiple staging environments and subversion for everything. I've been googling a lot, and have some questions on how handle highend ...
1
vote
0answers
17 views

Why does the usermeta table contain html entities?

As a plugin developer, I have been storing special characters like ampersand as is in MySQL tables, then converting them to html entities after retrieving them for display. Now I discover that (for ...
1
vote
0answers
8 views

Make a form that will send email to all the authors in selected category

Is there a way by which i can make a contact form in which user can choose a category from a drop down list and write a message. Then all the authors of the selected category will get an email with ...
1
vote
0answers
17 views

Get Adjacent post by search query

I want to get previous/next post, but to keep that within the same search query (I keep the searched terms from the previous page via the URL.) Is there any way to do this? It doesn't seem to be in ...
1
vote
0answers
18 views

Automatically adds check on hide title and add paragraph when adding text

It most certainty wasn't like that before. I don't know what happened but now when I try to add an enhaced text, everytime when I update the page, the boxes of hide title, add automatically paragraphs ...
1
vote
0answers
27 views

Use “archive” as slug for custom post type

I need to have a custom post type slug and its associated taxonomy's slug to have value "archive". Any other value is ok, I've tested it, so there is no problem with the code per se. I guess the path ...
1
vote
0answers
15 views

Endpoint on Specific Page Slug

I have created an endpoint inside of my plugin: add_rewrite_endpoint( 'libstaff', EP_PAGES ); Now I would like to have the endpoint work for one page only based on its slug. In this case, I want it ...
1
vote
0answers
18 views

two factor authentication

i am working on a two factor authentication plugin using a third party API. API and WordPress plugin setting page are ready. now i need break default wp login process in two parts like this: This is ...
1
vote
0answers
22 views

publish_post conflicts with save_post

my plugin has a save_post hook used to save the custom fields. now I add a publish_slider hook used to change a checkbox's status(slider is a custom post type). but it doesn't work properly. the ...
1
vote
0answers
40 views

How to query all posts of a specific category, and any other category combination

Basically, I'm looking to query all post of category 'news', and any combination of other categories to display as Related News on single content type pages. So, if someone writes a post, and ...
1
vote
0answers
38 views

Sortable product selector

I am currently trying to find the best way to implement a 'sortable product selector' into a WordPress site. The best way to describe what I am trying to achieve is by uploading screens as an example. ...
1
vote
0answers
23 views

getting the current sub item out of total sub items in a given dropdown (custom walker)

i would like the possibility to append a text(denoted in square brackets) to each sub-item in the menu like so: Parent 1: sub-item [sub item 1 of 5] sub-item [sub item 2 of 5] sub-item [sub item 3 ...
1
vote
0answers
21 views

Automatically Add New Tags to Sub-menu

Been searching for any related plugins or info. about this case but didn't find anything relevant or working. I need every new tag that is added to a post automatically appear in a menu as a sub-menu ...
1
vote
0answers
31 views

How to prevent shortcode preview from breaking in tinymce editor?

I am creating visual preview for shortcodes (just like captions). I have don't most of the parts but my preview html is getting broke by the editor when post is saved. I have investigate it further ...
1
vote
0answers
16 views

CPT Validation to not show “Post updated.”

Now this has been asked several times over on all WP forums, but how you change the success message? First, I know there are 2 choices for managing the error message: setting in the options and using ...
1
vote
0answers
12 views

Conflict with Force SSL and Rewrite Rules

A site I'm working on has two security-related requirements which I've been unsuccessful in solving simultaneously. I can satisfy each requirement BY ITSELF, but I'm running into problems satisfying ...
1
vote
0answers
29 views

Make Category Base Appear in Posts Permalink (but not tags)

I have a slight problem with WP permalink structure. My aim is to make posts permalink appear with a specific category and it's base, for example: domain.com/custom-base/%category%/%postname% And ...
1
vote
0answers
32 views

wp cron job fires at every second or so, if callback is wrapped with DOING_CRON check it never fires at all

I am a bit lost while dealing with a open source plugin implementing wp cron. You can read about the problem on github https://github.com/nekojira/wp-currencies/issues/6#issuecomment-116735909 - I ...
1
vote
0answers
23 views

how to localized scripts of new page requested by ajax?

I'm using ajax to load pages in WP ( all links of my theme works with ajax) and when i go from a page to another, I remove old script tag ( current page ) and add scripts of requested page ...
1
vote
0answers
42 views

Issue with wp_insert_post and post_content field error Could not update post in the database

I'm having issues creating an import / caching script to be used within a WordPress site. This feed comes from a single text file that is then parsed and returned as an array. When running through ...
1
vote
0answers
48 views

check if author has published posts in custom post type, then send mail

I have a site where people can submit drafts to a custom post type from the frontend. Once a user submits the form, a new WP user is created. If the user is logged in the submitted user e-mail ...
1
vote
0answers
46 views

Update post meta using save_post hook in multisite

I am trying to update a post meta field in a custom post type in Multisite. i am using the save_post hook to do so unsuccessfully. I don't know if the reason / cause is the multisite? or wrong use of ...
1
vote
0answers
6 views

WP Customizer - Prevent live preview

How do I prevent a widget being updated in the customizer preview if a widget field fails a JS validation check? More generally, is there any actual documentation for the customizer JS API? (I mean ...
1
vote
0answers
22 views

Sharing post from archive page (loop) doesn't work

On my archive page, I have for each post( I have include in the loop) the possibiity to share the post via facebook via this code: <a href="http://www.facebook.com/sharer.php?u=<?php ...
1
vote
0answers
43 views

How to overwrite JS variable with wp_localize _script?

The function wp_localize_script( $handle, $name, $data ); does not work when trying to overwrite the same variable, that is when calling the function second time with the same $handle and $name but ...
1
vote
0answers
22 views

How can i use wp_get_image_editor for image resizing

I search a lot that how can i re-size images that upload with meta field but i get nothing instead of wp_get_image_editor. I read from codex about it but nothing helpful so I search about this ...
1
vote
0answers
24 views

Does get_the_content_feed strip invalid tags?

My Wordpress 4.2.2 generates post feed with this <content:encoded><![CDATA[ <p> ...some html here... <iframe style="border: 1px solid #CCC; border-width: 1px; margin-bottom: 5px; ...
1
vote
0answers
45 views

using walker menu to add classes and attributes to elements

I want to use wordpress walker menu to achieve exactly this menu structure: <a href="#myid" class="list-group-item" data-toggle="collapse">Item 1</a> <div class="collapse" ...
1
vote
0answers
14 views

Loading media on local WordPress using remote database

For my theme development purposes I have a local WordPress installation that I run from a VM, accessed via, let's say, http://local.app. I also have a remote version of the site on a staging server, ...
1
vote
0answers
14 views

Importing XML didn't finish, site is now inaccessible

I have a network of 12 sites, I tried importing an XML for the main site, and it was taking hours, so I simply closed the page. Today I find that I can't access this site, but I can access all the ...
1
vote
0answers
35 views

How to force non SSL on just one page?

How do I force only one page on my WordPress blog to NOT use SSL?
1
vote
0answers
100 views

Why does WordPress 4.2.2 require FTP to update?

I am trying to update to WordPress 4.2.2, but it requires FTP details. Considering that everything WordPress-related is assigned to apache, and the server runs as apache, shouldn’t WordPress be able ...
1
vote
0answers
36 views

XMLRPC newPost post_content issue

My php script to post new content via xmlrpc to remote blogs occasionally fails due to the dreaded transport error. Usually I just end up manually posting this content, but now I'm trying to debug ...
1
vote
0answers
47 views

Custom thumbnail size of image when uploaded

I'm trying to make a custom thumbnail size when I upload an image only for GIFs. How do I get the image_path? list( $width, $height, $type, $attr ) = getimagesize( $image_path ); $thumbWidth = ...
1
vote
0answers
15 views

Correct regex for Nginx FastCGI cache?

https://codex.wordpress.org/Nginx#Nginx_fastcgi_cache currently has the following regex: # Don't cache uris containing the following segments if ($request_uri ~* ...
1
vote
0answers
20 views

What is the purpose of having a token in cookies?

WordPress utilizes cookies for better security, and I've been trying to understand how exactly this could make a WordPress website more secure, and I found this article . There's a pretty decent ...
1
vote
0answers
9 views

Login again after profile update

I am trying to update user profile from front. On submit of the profile form this is my php code: wp_set_password( $password, $user_ID ); wp_update_user( array( 'ID' => $user_ID, 'user_email' ...
1
vote
0answers
13 views

Where are $current_user->allcaps set?

I recently found a problem with WP in which even the admin has no permission to get to anything on /wp-admin/. Oddly enough, when I compared the $current_user->allcaps to those on a normal site, I ...
1
vote
0answers
18 views

Set post to unpublished after one week depending on condition

I have a post type with a custom field checkbox. If this checkbox is checked and the post is published, I want to unpublish when one week has passed since last modified date. How would I go about ...
1
vote
0answers
19 views

Disabling pingback and trackback notifications

I'm trying to disable pingback / trackback email notifications and was wondering if there's a .php file I can edit to prevent them? I've disabled them in the main WP settings (which I think just ...
1
vote
0answers
18 views

Custom and browser agent logging in wordpress

I wanted to log browser agent, screen size, timezone (including current system time). This is my first go at any web server (wordpress is my first install). I wanted to do this without plugins by ...
1
vote
0answers
17 views

Host frontpage via example.com and everything else via example.com/blog

I've assigned a page as frontpage which will be available via example.com. All the other pages should be below the /blog. For example: Main-page: example.com All posts: example.com/blog Single Blog ...
1
vote
0answers
149 views

I am getting allowed memory exhausted in wp-db.php

Today I checked my error_log and found these errors in it. PHP Fatal error: Allowed memory size of 176160768 bytes exhausted (tried to allocate 5290845 bytes) in ...
1
vote
0answers
68 views

Admin wp_ajax hook returning 0

I've done some research but I can't seem to find the correct answer so I'm hoping someone can give me a hand. I'm attempting to use the wp_ajax hook in the admin section. The functionality should be ...
1
vote
0answers
65 views

AJAXIFY WordPress Theme Frontend menu

I have the next code in my functions.php add_action('wp_enqueue_scripts', 'my_frontendscript'); function my_frontendscript() { //registering script wp_register_script('frontendscript', ...
1
vote
0answers
49 views

WP Query to have sticky posts first, with pagination and having a joint 'posts per page' arg with main loop

I am building a Wordpress site and have come to a bit of a wall while using a WP_Query, it started out quite simple but then sticky posts got thrown into the mix and it's becoming a bit harder to ...

15 30 50 per page