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

shayankm on "Compressing wp-posts in database"

$
0
0

I'm going to start my new website that it covers new posts of some other web resources(by a separate bot). So It's going to have more & more posts every minute.
For some different reasons I decided to use wordpress instead of building a new CMS. But the main problem is that wordpress saves posts content in html on database(not compressed)! I need to decrease the growing size of database!

I wanna know:
1. How is it possible to compress wp-post main content by a php function like bzcompress?(writing/reading compressed content without any errors)
2. What are the side effects, updating core problems, ... of this operation?


shawngibson on "Can I incorporate this into WP?"

$
0
0

I started building a site: My site

How hard would it be to change this into a page/link on my WP site such that it's all linkble/one?

crashbdx on "Custom post type taxonomy not filtering correctly"

$
0
0

i created a custom post type and also some taxonomy to be able to perform sorting on the display list.

It is all working well on my local testing installation but as soon as i put on the production website (where there is some other plugins etc installed compared to my local), then the sorting is not working anymore, any idea ?

Here some part of the plugin code related to my taxonomy and custom post type :

add_action('init', 'students_init');
function students_init(){

    $labels = array(
        'name' => 'Students',
        'singular_name' => 'Student',
        'add_new' => 'Add a student',
        'add_new_item' => 'Add a new student',
        'edit_item' => 'Edit a student',
        'new_item' => 'New student',
        'view_item' => 'See the student',
        'search_items' => 'Search a student',
        'not_found' => 'No students',
        'not_found_in_trash' => 'No students in the trash',
        'parent_item_colon' => '',
        'menu_name' => 'Students',
    );

    register_post_type('student', array(
        'public' => true,
        'publicly_queryable' => false,
        'labels' => $labels,
        'menu_position' => 2,
        'capability_type' => 'post',
        'supports' => false,
    ));

    //add_image_size('slider', 1000, 300, true);

    register_taxonomy( 'activity', 'student', array( 'hierarchical' => true, 'label' => 'Activity', 'query_var' => true, 'rewrite' => true, 'show_admin_column' => true, ) );

}

add_action( 'restrict_manage_posts', 'students_restrict_manage_posts' );
function students_restrict_manage_posts() {
    global $typenow;

    if ( $typenow == 'student' )
    {

        $taxonomy = 'activity';
        wp_dropdown_categories(array(
            'show_option_all' =>  'Voir toutes les catégories',
            'taxonomy'        =>  $taxonomy,
            'name'            =>  $taxonomy,
            'orderby'         =>  'name',
            'selected'        =>  $_GET[$taxonomy],
            'hierarchical'    =>  true,
            'show_count'      =>  true,
            'hide_empty'      =>  true
        ));
    }
}

add_action( 'request', 'students_admin_request' );
function students_admin_request( $request ) {

    if ( is_admin() && isset( $request['post_type'] ) && $request['post_type'] == 'student' )
    {
        $taxonomy = 'activity';
        $request[$taxonomy] = get_term_by( 'id', $request[$taxonomy], $taxonomy)->slug;

    }
    return $request;
}

Here what i have :

Screenshot 1

here what i get when i filter :

Screenshot 2

bat08 on "Mass Export File"

$
0
0

We have 1000 users on our server and we are trying to download export files for all the users and send it to them.

We were thinking to traverse through each users directory to execute the export function in export.php in the users wordpress directory. The problem is that we were not able to execute the function as admin. I have used define('WP_ADMIN', TRUE) and it only works when there is a valid user logged in.

Is there anyway I can execute the export function from the backend to generate the export file?

BuzzardBox on "Wont let me "drop" image into designated div with HTML"

$
0
0

Just trying to code a simple drag and drop section on one of my pages. I can drag it, but it wont let me drop into the box i designate.

I just copy and pasted the code from Here http://www.w3schools.com/html/html5_draganddrop.asp

Any pointers would be great.

pointer2pointer on "malware"

$
0
0

Hello,
please i need your help. I have problem with my web-page http://www.sttrading.sk/. There is some link "instant approval installment loans for bad credit" and i dont want it. How to erase it please? How it came? How can i protect?
Thank you

djm500 on "Spam in search input field"

$
0
0

In my wordpress site running 4.1.1 if you are not logged in as amin you search viagra spam in the sites search input field and the wp login window. How do I get rid of this. Theme I'm running is Function but I would this this is on the core WP files.

Bourrelly on "hacker took control of the wordpress access"

$
0
0

Hi, thank you for reading !
The access to the admin of wordpress are denied. As i still avec access to the cpanel I discovered that all users logins and passwords had been changed into admin and same password.
The new admin was saadworm@hotmail.fr.
I cancelled it, Icreated a new user (as the others admins of the site had disappeared), turned it into new admin.
I manage having access to the admin of the site during 5 minutes and then... again...
there is no new admin in the wp-users table and I again gained an "admin" login name and an unknown password.
It seems that a script is changing every new users' login and password. I don't know where to look for.
Any idea ?
Thanks you
Chris


kishore_0906 on "Automatic Image Publish and Posts Added"

$
0
0

Hi,

I am facing strange situation where my website has been hacked recently.

1. Image uploaded and get published automatically without my control.
2. Posts added but not published.

I checked my db table and it shows 16k+ rows.

I checked my media library and there are 12k+ images.

I have temporarily password blocked my website but how should I stop these automatic image and post adding?

Please help me.

Thanks in advance.

Regards,

Kishore

WPNI on "Hide featured image if post format is gallery"

$
0
0

Currently creating a custom base theme, on single.php I am showing the featured image at the default 150px x 150px size, it is right aligned within the post.

My code looks like this:

<?php
			if ( has_post_thumbnail() ) {
				$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'big-thumb' );
				echo '<a rel="lightbox" href="' . $large_image_url[0] . '" title="' . the_title_attribute( 'echo=0' ) . '">';
				the_post_thumbnail( 'thumbnail', array( 'class' => 'post-thumb' ) );
				echo '</a>';
			}
		?>

		<?php the_content(); ?>

However I want to place a statement to hide the post_thumbnail IF the post format is gallery. What would I add to either the content-single.php or functions file?

jelly_bean on "Tell sidebar archive to use a different archive page for output"

$
0
0

I have a featured blog item on my main blog page which is using the archive template to display the list of posts. However if I click on a month on the archive widget sidebar I don't want to see my featured blog post. I want to use a different template to show the sidebar results; one that does not contain the code for my featured post. This is the only way I can think of at the moment to stop the featured blog post appearing on the monthly archive pages.

Any idea on how I tell the sidebar archive widget to use a different archive template?

Just in case you are wondering I used this tutorial for my featured blog and inserted the code into the top of the archive page.

leon8739 on "Can't upload photos any more"

$
0
0

Hello,

My website http://www.leonvanham.com is very difficult to open at the moment. My efforts to upload photos don't succeed .Did everything possible for an amateur. The first photo stops at 20% crunching. Is this a possible hacking ?
All advice is welcome !

Sergejack on "Are all those files executed?"

$
0
0

As far as I know, in a plugin's root directory, only the file named according to the plugin gets automatically executed by wordpress.

So if my plugin's name is "abcd1234" only "./wp-content/plugins/abcd1234/abcd1234.php" should get executed.

if in the same directory there's a file named "execute me.php" (./wp-content/plugins/abcd1234/executeme.php) it shouldn't get automatically executed by wordpress... right?

Ali Irani on "How to restrict users in edit post that can just select exists tags? not add new"

$
0
0

Hi
How to restrict users in edit post that they are just can select exists tags in select box and can not add new tags in Tags meta box?

zep101 on "Manage RSS feed"

$
0
0

I am using a feature in AWeber for blog broadcasts where it will send a blogpost to my email list using my RSS feed from my website.

In AWeber I have it configured to show entire post but all that shows up is the title.

I think it is an issue with how my feed outputs. Has anyone ever run into this?

How do I control what my feed puts out? Full or excerpt and image, etc.


casey6 on "User role to edit published post and hold for review"

$
0
0

What I am looking for is a user role that can edit their posts which are already published, but without the ability to publish those changes.

So the post they are editing is already live, but the changes they make aren't updated until an admin (or whoever with a higher role) approves the changes. So basically the changes would be staged until they get approval, but the original post would remain published.

The default contributor role seems close to this. And I have added the 'edit_published_posts' ability. But when they edit a published post it publishes those changes, whereas I want them to be held for review.

Anybody have ideas?

acheetham on "Add HTML inside body tag on every page using plugin?"

$
0
0

I am creating a plugin that needs to add a snippet of HTML as the first child of the body element on every page/post. This needs to be done by the plugin, without requiring the site administrator to edit any theme files. I know I could simply use jQuery('body').prepend(), but I'd rather use a more WordPress-official way of doing this – if there is one. I've searched but can find nothing helpful. Am I missing something?

Background:
The plugin will add the Infusion UI Options component to any WordPress site. You can see this component in action here: http://build.fluidproject.org/infusion/demos/uiOptions/
The HTML for this component should be as close to the first thing in the page as possible, to ensure that it happens early in the tab order.

What I've tried:
I've looked into Widgets, but as far as I can tell, they're restricted to official sidebars, whose location is controlled by the theme. I tried creating a new sidebar for the widget, but in order to add it to the theme in the right place, either the side admin has to modify the theme files, or the plugin has to inject the code to add the sidebar, which is back to jQuery.prepend. A Widget also seems like a bit of overkill, since what I'm doing doesn't require any configuration at all, and I don't need any administrative interface to allow the site admin to add or remove the component as a Widget, since this is the only thing the plugin does, so add/remove would be accomplished by adding/removing (or disabling) the plugin itself.

I've looked through the documentation on hooks and actions and I haven't found anything that looks like it will help me do what I want to do.

I've glanced at the code for a couple of plugins that allow you to add markup to the header area, and they seem remarkably long, which makes me suspect their approach would be overkill for me.

So: Is there a "WordPress way" to do what I want to do, or should I just go ahead with jQuery.prepend?

Thanks in advance for any advice.
--
anastasia

radenb on "Changing a Site Logo on scroll"

$
0
0

I'm currently trying to change my site logo when the page scrolls down to a smaller version that rests on the menu bar I have fixed at the top of the page.

I've tried adding the following jQuery

jQuery(window).scroll(function(){
    var fromTopPx = 5;
    var scrolledFromtop = jQuery(window).scrollTop();
    if(scrolledFromtop > fromTopPx){
        jQuery('site-logo').addClass('scrolled');
    }else{
        jQuery('site-logo').removeClass('scrolled');
    }
});

accompanied by the following in the .css

site-logo.scrolled {
	background-image: url(http://localhost:8888/wordpress/wp-content/uploads/2015/03/NIS_Small_Full_LogoEdit_background.png);
	position: fixed;
	z-index: 11;
}

It does not seem to change it at all, any suggestions as to why it may not be working or a better way to go about doing it?

seeiran on "dropdown category parent child"

$
0
0

I am designing a menu that lets dropdown states elected first and second field cities in that state. It is now in my sample. But the problem is that you want in the second box, select the option for the user to be able to handle all the cities of the state just display.
http://seeiran.ir

SamSeyller on "Using WordPress Login Elsewhere on my Site"

$
0
0

I'm fairly new to WordPress but have been learning PHP for awhile now and was wondering if its possible to do the following:

I have WordPress installed at the root of my site and I was wondering if I could develop my own PHP pages in a sub-folder and incorporate the WordPress login into those pages.

What I mean is that once a user logs into my main WordPress site, is there any way in my own PHP file to check if a user is logged in and also see what their username is?

Viewing all 8245 articles
Browse latest View live




Latest Images