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

vahost on "nested shortcodes"

$
0
0

I'm trying to create a second instance of the home page that contains the same content as the actual home page. The actual home page includes some shortcodes, and they fail to convert from the shortcode to the actual replacement content on the second home page.

Here is my function for my shortcode to make the actual home page appear in the second home page:

/* Load home page content into second version of page via shortcode */
// [home2]
function second_home_page( $atts ) {
	$post_8 = get_post(8);
	$content_8 = $post_8->post_content;
	print $content_8;
}
add_shortcode( 'home2', 'second_home_page' );

That worked, except that the shortcodes didn't fire in the second home page. Instead, I simply see entries like [shortcode] in the text of the live page.

So, I tried to add a filter to my function, like this:

/* Load home page content into second version of page via shortcode */
// [home2]
function second_home_page( $atts ) {
	$post_8 = get_post(8);
	$content_8 = $post_8->post_content;
	add_filter( $content_8, 'do_shortcode' ), 11 );
	print $content_8;
}
add_shortcode( 'home2', 'second_home_page' );

However, this results in not only the shortcodes from the actual home page failing to fire on the second home page, but it also prevents other short codes associated with the template from firing as well.

Can someone tell me how to fix this?


Palagrin on "Custom post type archive pages from one template file"

$
0
0

I've got a custom post type (reviews) and several custom taxonomies pertaining to that type (authors etc etc). I've made a template file called archive-reviews.php, which I want to be used for all archives (including custom taxonomy archives) in the custom post type.

Right now, however, it's only working for example.com/reviews - and it won't work for other custom post type archives (authors etc).

Is there anyway I can do that? As far as I know I've used the correct naming procedure, but I might be wrong.

Thanks in advance

json21 on "Not able to remove default gallery shortcodes from Point theme"

$
0
0

I am using a function like this in a child theme of several other themes, and it does the job:

<?php
function remove_shortcode_from_excerpt($content) {
  $content = strip_shortcodes( $content );
  return $content;
  }
add_filter('the_excerpt', 'remove_shortcode_from_excerpt');
?>

I created a simple child theme for Point theme (https://wordpress.org/themes/point), and the above code does not work.

index.php code of the original / parent theme looks like this:

http://pastebin.com/UKFeGWej

Would you have an idea, what modifications would I need to make, in order to get it to work?

Thanks.

Darkzoo on "Wordpress 3.9 Security"

$
0
0

Hi. I am a new beginner in the world of Wordpress. My goal is to do a penetration test and exploit my own site. Is there a lot of techniques ? I did find that my site is vulnerable to CVE-2014-5203, but i am not a php programmer, so i don't know what i can do...

Cheers.

anjx on "Rewriterule and mask original link from html"

$
0
0

Hi,
I'm using a rewriterule for my website:

RewriteCond %{THE_REQUEST} pagename=immagini&gallerytag=([^\s\?]+)\s [NC]
RewriteRule ^ immagini/ngg_tag/tags/%1? [R=301,L]
# Internaly rewrite
RewriteRule ^immagini/tags/(.*)/?$ /pagename=immagini&gallerytag=$1 [QSA,NC,L]

Works fine, but when I'll put the mouse cursor on the link, I see a not rewrited url, ex:
http://www.site.com/?pagename=immagini&gallerytag=shoes
Exist a way to mask a non friendly url also in html code? I not want see the posted parameters in url.

Thanks
Angelo

Romas Tinke on "Search by List of inputs with multiple search results"

$
0
0

Hello, i´ve been using WP for a while, but this is my first support entry.

I´m trying to accomplish a search by list with multiple search results in one page. Like searching for a grocery list. Each searched item should return let´s say 10 results max.

Didn´t find a plugin that makes the job, so if you have any pointers will really help.

For example: Search input should be a text area like this
Search:
Coke
Cereals
Milk
Bread

Results Page:
Coke:
10 results for coke
Cereals:
10 results for Cereals
Milk:
10 results for Milk
Bread:
10 result for Bread

Thanks!!

nick2price on "Add html to active menu item"

$
0
0

Hi, I have looked everywhere for this but finding it surprisingly difficult to find. I have a normal Wordpress menu which I output like so
<?php wp_nav_menu(array('theme_location' => 'primary', 'container_class' => false)); ?>

When a menu item is selected in my website, it is given the class current-menu-item. So say if I am the home page, the li for home will have the class current-menu-item. However, the text which is outputted (in this case Home), I want to add a # infront of. So if Home is active, it will show #Home on my website.

So the li with the class current-menu-item needs a # added infront of it.

Would something like this be possible?

Thanks

sufyan_hassan on "Is there any plugin for showing only the posts from followed authors ?"

$
0
0

Hello WordPressers :3
is there any plugin or code that creates a follow button on author's profiles
and only shows posts from the authors that i have followed on the index page ?


batt humphreys on "hacked by green viper"

$
0
0

My site has been pulled down. only thing showing is 'hacked by green viper' .. anyone know what this is?

pediatri on "Hacked Issue"

$
0
0

Hi everyone i have some problem with my website i have clean WordPress installation with Woo-Commerce plugin and i don't know why someone every two days someone hacking my website i don't have and complex plugin and i don't know how i can fix please help me.

Thank you

Johan on "Show image on site when logged in to Wordpress"

$
0
0

I'm looking for a way to have an image to show up on my front page when ever I'm logged in to Wordpress. So that any visitor can see that I'm logged in right this moment.
And as soon as I log out - I want the image to dissapear.

Hope anyone smart can give me an idea. Thanks.
~ Johan

rebeccacann on "Hacked. Mobile & Safari Screen Blank"

$
0
0

My portfolio site http://www.rebeccacanndesign.com is showing all white with a broken link. When I log in through wordpress everything looks normal and I can't see any code with that link - though admittedly I am an amateur wordpress user.

Please help.

sohan5005 on "I want to make my own page builder"

$
0
0

Hi all,

I wanted to develop my own drag and drop page builder for my theme. But I have no idea where should I start.

I can do all visual things as a metabox. But have no idea how can I connect that data or shortcodes to the main content of the post. Even, I don't know if metabox is the right way to make a custom page builder.

So need help from you guys. Mainly I want to know 2 things here.

1. What is the right way to visualize my own page builder to the dashboard. Metabox or something else?

2. How can I make the default content editor collect data(shortcodes) from my editor as other page builders do.

Thanks in advance.
S.

yashveer on "How to add addthis sharing tool in after post .?"

$
0
0

I am new in WordPress anyone can tell me how to add addthis sharing tools in after post.?

haroonsultan on "Follow button loads very slowly"

$
0
0

Hello.

I really need a wordpress.com follow button on my site so I used this generator to make one:
https://developer.wordpress.com/docs/follow-button-creation/

However, the snippet for the button I placed in the footer and right before the content seems to be taking way too long to load. It appears a few seconds after the page has completely loaded and this causes people to miss it completely. Is there any solution to this problem? What might be causing it?

My site: http://www.clause7.com
The content page button is right below the post titles and can be found on all posts and pages.


wrongturn7 on "Change text of submit button"

$
0
0

Hello all,

how can I change the text of my submit button on contact form?(from "Submit" to some other word)? I use default contact form(not plugin) of Almera theme and just want to change text: Submit.

Grateful for any help.

Thanks!

palnal on "Malware and warnings"

$
0
0

Hi,
i am having the following malware seen in my log:Can someone please help me out figure this:
Backdoor:PHP/Fobushell.C
Backdoor:PHP/WebShell.A
Backdoor:PHP/SimpleShell.A
--------------------------------------
Some warnings:
PHP Warning: json_encode(): Invalid UTF-8 sequence in argument in D:\xxxx\wp-includes\update.php on line 277

PHP Fatal error: Call to undefined function wp_create_nonce() in D:\xxxx\wp-content\plugins\wordfence\lib\wfUnlockMsg.php on line 4

America/Tegucigalpa] PHP Fatal error: Maximum execution time of 300 seconds exceeded in D:\xxxx\wp-admin\async-upload.php on line 9

PHP Warning: unlink(D:\xxxxx/wp-content/uploads/2015/01/): Permission denied in D:\xxxxxx\wp-content\plugins\ewww-image-optimizer\common.php on line 918

America/Tegucigalpa] PHP Fatal error: Call to undefined function get_header() in D:\xxxxxx\wp-content\themes\sahifa\index.php on line 1

TIA

breathelifein on "Creating a new image size and having it as an option on the Media Library"

$
0
0

I'd like to create extra, custom image sizes, and then be able to chose from them when inserting an image to a post using the Media Library.
I tried following this post from the Codex [http://codex.wordpress.org/Function_Reference/add_image_size] and some others I found when googling, but I can't seem to be able to make it work.

I added to my functions.php:

if(function_exists('add_theme_support'))
add_theme_support('post-thumbnails');
add_image_size('thumb_small', 100, 127, true );
add_image_size('thumb_medium', 80, 102, true );

Then

add_filter( 'image_size_names_choose', 'my_custom_sizes' );
function my_custom_sizes( $sizes ) {
    return array_merge( $sizes, array(
        'thumb_small' => __( 'Miniatura P' ),
        'thumb_medium' => __( 'Minuatura M' ),
    ) );
}

But still, these size options don't show on my Media Library.
What am I doing wrong? How can I get it to work?
Thanks.

tgunasekhar on "404 Page modifications"

$
0
0

Hi,

In 404 page I would like to display a message and then display all the posts in wordpress. The below code is not working and obviously it seems that 404 is meddling with the default global query which results in zero records.

if ( have_posts() ) : ?>
<div>
<?php while ( have_posts() ) : the_post(); ?>
<div>
<?php
get_template_part( 'content', get_post_format() );?>
</div>
<?php else : ?>
<div> <h3>No posts to show </div>
<?php endif; ?>

This code always go to the else block in the 404 page. This is the same code I use on the main page to display all the posts. I tried to place wp_reset_query(); to reset the query to global default but no luck in fetching all the posts.

What am I missing here?

Thanks
Guna

JVeegh on "wp-admin (dashboard) won't display"

$
0
0

I upgraded today to 4.1 and now I can't load the Dashboard. The left side menu still works but when I try to open dashboard either a white page appears reading "This page can't be displayed." OR - it opens but then my Avast repeatedly detects some sort of malware called JS:ScriptIP-inf[Trj] (supposedly "moved to the chest") I've tried deactivating all of my plugins, but that didn't do it. Help?

Viewing all 8245 articles
Browse latest View live




Latest Images