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

bloomer_digital on "Been hacked, random links are everywhere on my site? Some advice would be great!"

0
0

Hi guys!

I'm working on a project for a small business called Ginsen - unfortunately the site has been hacked!

This is the site - http://ginsen-london.com/

Some previous designers were the ones who finished this project but ever since it's been finished there has only been more and more problems with the site. Links have been appearing all over the site and I've had to go through everything and remove these links and fix their mess, but somehow they're still being able to place these links on the site even after I remove them. I've changed all login details for hosting, FTP and WordPress - is it possible to do this sort of thing remotely? So maybe from a plugin they've installed or something?

Here's an example of one of the links - http://ginsen-london.com/mic.php?id=selmer-paris-mouthpiece-tenor-sax-s80-d-p-10415.html?zenid=ba17c78f19c232b02a07ec7a9f6f780b (there's around 30 of them that's been picked on Google Analytic's as crawl errors)

It looks like someone's used an iframe which contains an entire shop using ginsen-london.com as a URL, so I presume this shop isn't legit and they're probably just taking money from people and not sending any products. I think they're probably doing this for another number of sites as I found this company on eBay. I'd like to take these f*ckers down to be honest as they look like bloody scammers.

Would be very grateful for any thoughts or advice on this situation!

Cheers for reading!

Charlie


BdN3504 on "A very peculiar behaviour of a filter hook for wp_title"

0
0

I have written code for a custom post type. The custom post type is loosely based on the cpt-bootstrap-carousel plugin, but only as far as functionality goes.
My code makes use of the manage_$post_type_posts_custom_column action and the manage_$post_type_posts_columns filter. In the function I am passing to the manage_$post_type_posts_custom_column action, I am calling the following filter:
add_filter( 'the_title', 'my_prefix_alter_post_title_to_image_title' );
The function my_prefix_alter_post_title_to_image_title gets the title which has been set for an attachment like this (not the whole function for brevity's sake):

function my_prefix_alter_post_title_to_image_title( $title, $post_id ) {
  $meta = get_post_custom( $post_id );
  $url = reset( $meta['url'] );
  /* code to retrieve image title as set in the media library */
  return $title;
}

I am getting this information via the url of an image which is stored in a custom meta field in the post.

I have removed the title value from the supports argument passed into the register_post_type function, so the user has no way of entering a title for the custom post type.

Now comes the peculiar part: This all works as expected. When visiting the edit page for my post type, all current posts are listed with the columns I have designated. The funny thing is that the first row in the table which is used to display the posts behaves differently than all other entries.
The string 'Auto Draft' is displayed in the title column for the first entry, all other entries display the correct value (the title of the attachment as specified in the media library). Now my first assumption was, that this is due to a wrongly set priority in my add_filter call, but even if I set that priority to 1, it has no influence on this behaviour.

Do you know the root of this problem? How can this be solved?

L.str on "Disable option to change email"

0
0

Hi all,

I have a question. Every user got the option to change their e-mail, but I need to disable this option. Is there any way to do this, without hacking the core files?

andy_moyle on "Video Url in shortcode return.."

0
0

I've got a shortcode that successfully returns a bunch of html.
I want any video urls in that html to get "embedded" - but can only get the url to disappear if I try
$out=do_shortcode($out);
I've tried wrapping
https://www.youtube.com/watch?v=dQw4w9WgXcQ
in embed tags and made sure it's on it's own line too.

How do I get $out to have the embed magic happen please?

LeifIngeNB on "Gallery collecting info from SQL-file"

0
0

Hi, i'm trying to make a page which list the winners in a sport.
I have an SQL-file with the name of the winner, and other information like name of event, place, team and also url to a picture, and date won.

Is there an easy way to make a gallery with a big picture of the winner. And a textbox with the information. And making them easily able to browse from date to date.

I also want it to always start at the latest (and current winner).

Any tips?

Demokrit on "Responsive image markup"

0
0

Hi,

I'm a php developer and started my first WP theme 4 weeks ago to get an understanding of the WP-way to do things. My first goal is to build a perfect match of Twentyfourteen based on Bootstrap 3.2.0. markup and styles. Until now, every problem could be solved. I now have multiple widget areas, navigations, responsive post thumbnails and featured content - all speaking "Bootstrap".

The only problem left are image attachments. There is more than one way to get images to be responsive, and I want to start with the one, which can live with image dimensions generated by WP. To get this working there must be a wrapper element for the image with knowledge of the image dimensions. So the following markup will work, if "size-medium" reflects the percentage of the available image width in relation to the content width (I added it as an inline style for showcasing):

<span class="size-medium" style="width:36.6%;">
	<img height="219" width="300" alt="The ALT text" src="myimage.jpg" class="img-responsive">
</span>

or

<a href="myBigImage.jpg" class="size-medium" style="width:36.6%;">
	<img height="219" width="300" alt="The ALT text" src="myimage.jpg" class="img-responsive">
</a>

or

<figure class="wp-caption size-medium" id="attachment_50" style="width:36.6%;">
	<a href="myBigImg.jpg">
		<img height="219" width="300" alt="The ALT text" src="myimage.jpg" class="img-responsive">
	</a>
	<figcaption class="wp-caption-text">The Image Caption</figcaption>
</figure>

My first approach was the "img_caption_shortcode" filter. The "$atts['width']" can be used to determine the correct wrapper class for the image. This is a bit hacky, but works like charme - as long as you have a caption and stick to predefined image sizes. If you don't, this filter will fail, since Core function "img_caption_shortcode" returns a static image tag in case of missing captions before applying the custom filter. This makes it impossible to wrap an img tag into "figure" tags by default (which would be perfectly ok, since "figcaption" is optional).

There would be no problem at all, if "size-medium" class could be applied to any wrapper element instead, be it a link or figure tag. But instead it is added to the img tag, where it is useless (unless somebody invents the css parent selector)

So, to ask a more abstract question: How can I create a wrapper class for an img-tag, which works in any scenario?

Thanks for any help,

Thomas

TheCellarRoom on "RSS feed customization + non wordpress db queries help"

0
0

Hello,

I have a unique/custom WordPress install that has several non-WordPress tables in the database. I would like to publish some of this information directly into my rss feed without it appearing as posts on the website - a bonus for feed subscribers

i therefore need to customize how the rss feed is generated, insert some custom code to create items. override the permalink/urls/title urls published to the feed (because they will just fail/404).

I have been able to create RSS feeds outside of WordPress in a completely separate feed at a different url, but ideally would like to combine these into one complete feed with <item></item> appearing chronologically and only when triggered by a query to a date in a database table. so items appear in the correct order and only once (i.e. they sit within the loop of posts).

does anyone have any experience of this or any pointers or code examples?

thanks

pcknights22 on "Wordpress replaces x"

0
0

Hi I have a major issue
I have a title 3x1 but the wordpress keep changing the x with the multiply x sign (which is smaller and positioned in the mid).
What I need is the simple x x Even if I change it from html view and save it the next time i open the post and update it will change it again.
So right now every time i save the post i have to use x
Is there anyway to permanently deactivate this or replace it?
I have tried the ps-stop auto formatting module but didn't work
Any ideas mostly appreciated.


heatherplude on "Title in browser tab not changing"

0
0

I have tried everything I can think of to change the words in the browser tab.

http://juliehoffmantv.com/

Under Settings --> General the Title says "Real Estate Investing"

I put <title>Real Estate Investing</title> in the header.php file of the theme.

I searched all the theme's php files for the word "Alberta" and removed it from the function.php file

I put Real Estate Investing in the Genesis SEO settings as the title for the blog.

I have cleared browser history, tried other browsers and computers....

The title showing in the tab still says "Alberta Real Estate Investing" any ideas of what ELSE I can try?

nikhilbhuktar on "can't login to wp-admin even after resetting password"

0
0

Hello,
I have this website on the wordpress platform. It was working fine till 2 hours ago, when i tried to login now, I'm unable to access it. I reset the password from phpMyadmin, but with newly set password also i can't login into my account. Another problem the website is showing posts which were written about a month ago. Is this normal problem with wordpress or somebody has hacked my website. If it is hacked then please provide me some solution.
Thank you

Maud Kon on "Get custom tables from database in wp-config.php"

0
0

I want to use another Wordpress installation that gets it's tables from my original Wordpress prefix. I installed both WP installations in the same database with another prefix. I use WP Event Manager and the original prefix is like this:

wp_em_events

I want the same plugin at my new installation to automatically get it's tables from the orginal one, like the following code already does for the users at my wp-config.php:

define('CUSTOM_USER_TABLE', 'wp_users');

Is there a rule I can use at my wp-config.php file like the one that gets the users? or is there another way to get the data from the orginal table to the new one?

manotomusic on "D'dos Protection"

fashionmugging on "Online Casino link maleware on my blog"

0
0

I have a problem with a bug/malware on my blog. A link to the Casino page appears once in few site visits in left top site's corner. When I don't see it, I can see in my site stats that my readers unfortunatelly click on it. My address is " http://fashionmugging.com "
I read some topics that plugins may be responsible for the infection and contain some wrong codes. Here's the list of the plugins I use:
- Akismet
- Blogger Importer
- Categories to Tags Converter Importer
- Disqus Comment System
- Google Analytics by Yoast
- Google Typography
- Jetpack by WordPress.com
- rewardStyle Widget
- SEO Keyword Page
- Spacer
- Ultimate Google Fonts
- WordPress Importer
- WP Super Cache
It leads to the "onlinecasino-games.com/ru/" and I feel powerless in that matter. Here's a screenshot: http://oi58.tinypic.com/301cy14.jpg
Can anybody help me?

mortonc on "Front end posting overwriting custom meta fields"

0
0

I've created this page in my theme which allows users to edit their posts. It changes the information which there are fields for in the page BUT it overwrites all the other custom meta fields which are not in the edit page. Any ideas of where I'm going wrong?

<?php /* Template Name: Edit Posts2 */

$query = new WP_Query(array('post_type' => 'customtype’, 'posts_per_page' =>'-1', 'post_status' => array('publish', 'pending', 'draft') ) );

if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post();

	if(isset($_GET['post'])) {

		if($_GET['post'] == $post->ID)
		{
			$current_post = $post->ID;

			$title = get_the_title();
			$content = get_the_content();

			$custom_one = get_post_meta($current_post, 'custom_meta_1', true);
			$custom_two = get_post_meta($current_post, 'custom_meta_2', true);
			$custom_three = get_post_meta($current_post, 'custom_meta_3', true);
			$custom_four = get_post_meta($current_post, 'custom_meta_4', true);
			$custom_five = get_post_meta($current_post, 'custom_meta_5', true);

		}
	}

endwhile; endif;
wp_reset_query();

global $current_post;

$postTitleError = '';

if(isset($_POST['submitted']) && isset($_POST['post_nonce_field']) && wp_verify_nonce($_POST['post_nonce_field'], 'post_nonce')) {

	if(trim($_POST['postTitle']) === '') {
		$postTitleError = 'Please enter a title.';
		$hasError = true;
	} else {
		$postTitle = trim($_POST['postTitle']);
	}

	$post_information = array(
		'ID' => $current_post,
		'post_title' => esc_attr(strip_tags($_POST['postTitle'])),
		'post_content' => esc_attr(strip_tags($_POST['postContent'])),
		'post-type' => 'customtype',
		'post_status' => 'publish'
	);

	$post_id = wp_update_post($post_information);

	if($post_id)
	{

		// Update Custom Meta
		update_post_meta($post_id, 'custom_meta_1', esc_attr(strip_tags($_POST['customMetaOne'])));
		update_post_meta($post_id, 'custom_meta_2', esc_attr(strip_tags($_POST['customMetaTwo'])));
		update_post_meta($post_id, 'custom_meta_3', esc_attr(strip_tags($_POST['customMetaThree'])));
		update_post_meta($post_id, 'custom_meta_4', esc_attr(strip_tags($_POST['customMetaFour'])));
		update_post_meta($post_id, 'custom_meta_5', esc_attr(strip_tags($_POST['customMetaFive'])));

		wp_redirect( home_url().'/?p=56' ); exit;
	}

}

?>

<?php get_header(); ?>

	<!-- #primary BEGIN -->
	<div id="primary">

		<form action="" id="primaryPostForm" method="POST">

			<fieldset style="border:none;">

				<label for="postTitle"><?php _e('Post\'s Title:', 'framework') ?></label>

				<input type="text" name="postTitle" id="postTitle" value="<?php echo $title; ?>" class="required" />

			</fieldset>

			<?php if($postTitleError != '') { ?>
				<span class="error"><?php echo $postTitleError; ?></span>
				<div class="clearfix"></div>
			<?php } ?>

			<fieldset style="border:none;">

				<label for="customMetaFour"><?php _e(‘Custom 4:’, 'framework') ?></label>

				<input type="text" name="customMetaFour" id="customMetaFour" value="<?php echo $custom_four; ?>" />

			</fieldset>

			<fieldset style="border:none;">

				<label for="postContent"><?php _e('Post\'s Content:', 'framework') ?></label>

				<textarea name="postContent" id="postContent" rows="8" cols="30"><?php echo $content; ?></textarea>

			</fieldset>

		<fieldset style="border:none;">

				<label for="customMetaOne"><?php _e(‘Custom 1:’, 'framework') ?></label>

				<input type="text" name="customMetaOne" id="customMetaOne" value="<?php echo $custom_one; ?>" />

			</fieldset>

			<fieldset style="border:none;">

				<label for="customMetaTwo"><?php _e(‘Custom 2:’, 'framework') ?></label>

				<input type="text" name="customMetaTwo" id="customMetaTwo" value="<?php echo $custom_two; ?>" />

			</fieldset>

		<fieldset style="border:none;">

				<label for="customMetaThree"><?php _e(‘Custom 3:’, 'framework') ?></label>

				<input type="text" name="customMetaThree" id="customMetaThree" value="<?php echo $custom_three; ?>" />

			</fieldset>

            <b> Booking Toggle:</b>
            </br>

      		<fieldset style="border:none;">
       			 <span class="toggle">

				<input type="checkbox" name="customMetaFive" id="customMetaFive" value="checked" <?php if($custom_five=="checked"){echo "checked";} ?> />

				<label for="customMetaFive" data-off="OFF" data-on="ON"></label>

                </span>
		</fieldset>

			<fieldset style="border:none;">

				<?php wp_nonce_field('post_nonce', 'post_nonce_field'); ?>

				<input type="hidden" name="submitted" id="submitted" value="true" />
				<button type="submit"><?php _e('Update Post', 'framework') ?></button>

			</fieldset>

		</form>

	</div><!-- #primary END -->

<?php get_footer(); ?>

SPINSYR on "Different Frontend and Backend Author Names"

0
0

I am setting up a multi-author blog, but I only want one "author" to be publicly displayed. The problem with changing all the "display names" to one selection is that it makes it difficult throughout the whole backend to see what user has posted/edited/etc certain content (because they all share one public name).

Normally I would just remove the author meta from the front end altogether, but in this instance we're also using jetpack email subscriptions and thus the author's name is displayed in the sent messages.

How can I display one unified author name on the frontend and several user-specific names on the backend?


Jamiethecomic on "If author display image (Archive Page)"

0
0

Hi there,

I was wonder how to display a image at the top of archive page for each author.

for example;
if_author('1')
Display image example.jpeg

Here is what I have;

<?php get_header(); ?>
<?php global $data;?>
<div id="blocks-wrapper" class="clearfix">
	<div id="blocks-left" class="eleven columns clearfix">
 			<!--Archive content-->
		<!-- .blogposts-wrapper-->

 					 		<h2 class="blogpost-wrapper-title" style="margin-top:30px;">
 							<?php if(is_day()): ?>
 								<?php printf(__('Daily Archives: %s', 'bresponZive'), get_the_date()); ?>
 							<?php elseif(is_month()) : ?>
 								<?php printf(__('Monthly Archives: %s', 'bresponZive'), get_the_date('F Y')); ?>
 							<?php elseif(is_year()) : ?>
 								<?php printf(__('Yearly Archives: %s', 'bresponZive'), get_the_date('Y')); ?>
 							<?php elseif(is_category() || is_tag()): ?>
 								<?php printf(__('Articles Posted in the " %s " Category', 'bresponZive'), single_cat_title('', false)); ?>
 							<?php elseif(is_author()):
							$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
							?>
 								<?php printf(__('Articles Posted by the Author: %s', 'bresponZive'), $curauth->nickname);

								?>
 							<?php else: ?>
 								<?php _e('Blog Archives', 'bresponZive'); ?>
 							<?php endif; ?>
  						</h2>
						<?php include_once('includes/blog_loop.php');?>

 	</div>
 			<!-- END MAIN -->
 <?php get_sidebar(); ?>
 <?php get_footer(); ?>

What code and where do I place it?

Reuven.g on "Disable the javascript function wp_attempt_focus() in wp-login"

0
0

Near the end of the wp-login.php file there is a definition of a javascript function wp_attempt_focus() which do autofocus on on the inputs on a timeout.
I want to disable it and prevent it from firing.
Is there any possible way to do so without changing the wp-login.php
file?
I have tried adding javascript to the login_footer action hook,
setting the inputs to blur.
It removes the focus on the input but it is done after focusing on the input, which I want to prevent from happening.
Is there a way to do this without deleting the function from the wp-ogin.php file?

Julie @Niackery on "Correct Way to Get Taxonomy Feed Link?"

0
0

I've got this on category archive pages and everything works well:

<?php
$category = get_category( get_query_var('cat') );
$current_category = single_cat_title("", false);

if ( ! empty( $category ) )

echo '<div class="tax-feed"><p style="text-align: right; padding-right: 2px;">Subscribe to the <strong>' . $current_category . '</strong> category: <a href="http://www.feedly.com/home#subscription/feed/' . get_category_feed_link( $category->cat_ID ) . '" title="Subscribe to the ' . $current_category . ' category via Feedly" rel="nofollow">Via Feedly</a> | <a href="' . get_category_feed_link( $category->cat_ID ) . '" title="Subscribe to the RSS feed for the ' . $current_category . ' category" rel="nofollow">Via RSS</a></p></div>';
?>

Next I've got this on tag archive pages, but the Feedly link doesn't work:

<?php
$category = get_category( get_query_var('cat') );
$current_category = single_cat_title("", false);

if ( ! empty( $category ) )

echo '<div class="tax-feed"><p style="text-align: right; padding-right: 2px;">Subscribe to the <strong>' . $current_category . '</strong> topic: <a href="http://www.feedly.com/home#subscription/feed/' . get_tag_feed_link( $category->tag_ID ) . 'feed/" title="Subscribe to the ' . $current_category . ' topic via Feedly" rel="nofollow">Via Feedly</a> | <a href="' . get_tag_feed_link( $category->tag_ID ) . 'feed/" title="Subscribe to the RSS feed for the ' . $current_category . ' topic" rel="nofollow">Via RSS</a></p></div>';
?>

The Feedly link doesn't output this part of the URL (though the rest of the link is fine):

' . get_tag_feed_link( $category->tag_ID ) . '

I find it really strange that this code works for the tag RSS feed link but not the tag Feedly link. Any ideas why, and how I could fix it?

I'd also like to display the links on custom taxonomy archives and am wondering whether I'll need different code for those, too.

Thanks in advance for any help offered!

Eva_etoile on "Parse error:syntax error....line 83"

0
0

Someone created my website for me and I'm no longer in touch with them. I do not know how to get rid of this error message.

Parse error: syntax error, unexpected 'if' (T_IF) in /home/evaet/public_html/wp-content/themes/rustik/functions/admin-hooks.php on line 83

I can't login into my admin page. Every time I go onto the page all I see is this message.

My website is http://www.evaetoile.co.uk

Please help 😩

Mike on "Website Hacked"

Viewing all 8245 articles
Browse latest View live




Latest Images