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

AbstruseOni on "How do I remove the homepage header on my Pytheas theme?"

$
0
0

I'm trying to remove the header from the homepage only, but I don't see a way to do it from the dashboard/wp backoffice. I read a few forums where someone had a similiar issue and they resolved it by injecting some code into the style sheet. I tried to do the same thing, but it doesn't say WHERE to put the code in the style sheet...so it didn't work.. Any help would be appreciated. Here's a link to the site i'm working on http://ryan.thirdplanethosting.com/


IAmJasonHope on "Import RSS and publish on page via iframe"

$
0
0

I'm not sure this is even possible with wordpress.

I'd basically like to consume an RSS feed, then be able to spit out those RSS feed items onto a site via an iframe.

I assume it would involve consuming the RSS feed and putting URL's into a database, then giving each URL an ID so I can then create a page on my site, with a header, and the iframed RSS URL underneath.

Any ideas or help would be appreciated!

nimh on "List posts only of specific terms from a custom taxonomy for wordpress"

$
0
0
$post_type = 'ba-pet';
$tax = 'status_ba';
$tax_terms = get_terms($tax);

	if ($tax_terms) {
		foreach ($tax_terms  as $tax_term){
			$args=array(
				'post_type' => $post_type,
	      			'tax_query' => array(array('taxonomy' => 'status_ba',
						'field'    => 'slug',
						'terms'    => array('available','pending'))),
	      			"$tax" => $tax_term->slug,
	      			'post_status' => 'publish',
	      			'posts_per_page' => -1,
	      			'caller_get_posts'=> 1
				);
			$my_query = null;
			$my_query = new WP_Query($args); [...]

The above code is what I have setup so far... I'm wanting to pull back posts from my taxonomy (status-ba) that has 5 terms in it, I only want to pull back a certain 2 taxonomies (available & pending).

Currently it's only pulling back 'pending', I have a post with 'pending' and one with 'available' statuses, so it should be pulling back both.

What am I missing?

Thanks

billium99 on "Posts on this date in history"

$
0
0

Hi - I have a category of blog posts, and there are many posts for each day of the year, and I'm hoping to somehow display these posts on the home page, so that on April 22nd, all posts from all years, on April 22nd, will display as thumbnails from - I don't know - maybe a short code?

These are homicide victims and missing persons, so the idea is to highlight those taken "On this day in history".

Is this easy to do with a modified Loop? I'm a Wordpress newb, but have been hacking in Joomla for a few years...

Any suggestions would be much appreciated.

Thanks

Bill

Bill Kellaway on "Wildcard Subdomain - Override get_site_url()"

$
0
0

I have a site that uses wildcard subdomains. Enter www. or wwg. or whateve and the site works - only on the first visit. If a user visits a second page they are taken to the www version because of the URL in the menu's displaying the absolute path that is built using the get_site_url().

I am trying to add a filter to over ride the built in get_site_url() function. The filter to the last line of the functions file.

Also for this to work you need wildcard subdomains set up - which I have.

Any ideas why this isnt working ?

function set_site_subdomain() {

$server_name = $_SERVER['SERVER_NAME'] ;
$host = explode('.', $server_name );
$this_subdomain = $host[0];

$site_url_array = explode(".", get_site_url() ) ;

$new_url = "http://".$this_subdomain.".".$site_url_array[1].".".$site_url_array[2] ;

return $new_url ;

}

add_filter('get_site_url', 'set_site_subdomain', 1 );

Thanks in advance

Serpentsoft on "Email field in comment box got a script after posted"

$
0
0

Hi there, i have some wordpress themes for 2 yrs, one of them had over 15,000 comments from spambot you know however, i decide to remove it and as curiosity i looked for email, URL and comment from (Quick Edit Comment) then i found the Email field has a script after it like

( becrusnqvsx@gmail.com/* <![CDATA[ */!function(){try{var t="currentScript"in document?document.currentScript:function(){for(var t=document.getElementsByTagName("script"),e=t.length;e--;)if(t[e].getAttribute("cf-hash"))return t[e]}();if(t&&t.previousSibling){var e,r,n,i,c=t.previousSibling,a=c.getAttribute("data-cfemail");if(a){for(e="",r=parseInt(a.substr(0,2),16),n=2;a.length-n;n+=2)i=parseInt(a.substr(n,2),16)^r,e+=String.fromCharCode(i);e=document.createTextNode(e),c.parentNode.replaceChild(e,c)}}}catch(u){}}();/* ]]> */ ),

i found all emails had this script, then after i removed all comments i tried to add a new comment and then look for new comment i found the same script added automatically after my email.

Is that a security issue in my site?? Thanks for your help.

kiranvaidya on "How to change the default upload directory to a fully hosted subdomain ?"

$
0
0

Although this has been already discussed I am still facing an issue. Request to please assist. My domain is lets say -
mywebsite.com with default upload folder as mywebsite.com/wp-content/uploads
Now I want my default upload folder to be http://multimedia.mywebsite.com/images and I already have a Fully hosted sub domain (not mirror) http://multimedia.mywebsite.com and thru FTP I created a folder such that http://multimedia.mywebsite.com/images is a valid URL.

For this I went to wp-config.php and added the line
define('UPLOADS', 'http://multimedia.mywebsite.com/images' );
just BEFORE
require_once(ABSPATH . 'wp-settings.php');

I logged into my wordpress admin account and uploaded a file lets say sample.jpg. Its uploaded to
http://www.mywebsite.com/http://multimedia.mywebsite.com/images/sample.jpg (It takes this as a valid URL and creates a folder "/mywebsite.com/http:/multimedia.mywebsite.com/images" in wordpress folder structure)

I was expecting the file to be uploaded at http://multimedia.mywebsite.com/images/sample.jpg

Please please tell me where I am going wrong and how I can fix this. I have spent a lot of time figuring this and all forums tell me to do exactly what i have coded. Also please dont suggest any plugins.

Thanks a lot in advance.

-Kiran

lthomas122 on "How can I make the area calculated into a global variable?"

$
0
0

I've got a product that is priced by area and I'm trying to add an add-on which is costed by area, also.

I'm using gravity forms product add-on and have got a hook placed in my functions.php, but I need the value that the hook takes to be the area calculated by the measurement plugin.

So I need the value of the area calculated to become a variable i can access in my functions.php. Any one have any ideas?


photoshopace on "Remove class from html element"

$
0
0

I am working with the responsive-childtheme. Can someone help me find out how to remove a class from the html p tags?

Current markup
<div class="grid col-450 fit">
<h1></h1>
<h2></h2>
<p class="p1"></p><!-- /.p1 -->
<p class="p2"></p><!-- /.p2 -->
</div><!-- /.grid -->

I need to remove the classes col-450 and fit from the p tags only.
Can this be done with css?
Can the p tags be placed outside the paren div tag?

wlansell on "Show post from latest category"

$
0
0

Hello Support,

I've currently creating a weekly news website.

Every week I create a new category for that week ie: 01-21-2015 all the main news goes into this category.

On the home page I want to show all the stories/posts/blogs from the latest category. As the category will change the following week ie 01-28-2015 it can't be depicted ie cat=234.

IS there a way to do this.?

Thanks for read and any help
Wayne

MedianP on "Auto-complete in post"

$
0
0

Hi !

I have a list of 600+ names that I use a lot in my posts. An exemple, when I type :

[Ri

I want wordpress to display :

[Ridley Scott]
[Rihanna]
[Rigobert Song]

So I just have to click on the name to write it properly. Is that possible with any existing plugin ?

Thank you !

sethbahookey on "How to apply JS to a link on front-page.php?"

$
0
0

All,

I'm trying to create a simple little JS script (or jQuery) to password protect a link on my front-page of site. Now keep in mind, it's not for security reasons! So don't freak out on me saying that is dumb lol. It's more or less to dissuade some end users from going to a certain section of the site.

So how would I go about doing this? I'd imagine I'd enqueue the JS, but from there my JS skills are pretty limited. Essentially what I'm envisioning is that when they click the link a pop up box will appear asking them for the password, and I'll make it something easy like Therapist, and that will allow them to get onto that page of the site. If it fails, it will simply say "Nope, try again." or something to that effect.

Thanks for the help!
Seth

ariapictures on "Theme Development - stuck on sidebar"

$
0
0

Not sure if this is the right area, but I am frustrated and depleted of excitement... Just when I think I have it, I don't.

I have created a theme from scratch (downloaded the basic files - from somewhere) and I am not going to go public with it. It is not designed for that purpose.

I have the header, footer, templates, and everything else working wonderfully, so I can add certain types of pages with custom fields, and such, you know...

Now I want to initiate the weblog, which I actually have working, of sorts, the styling is not finished...

THE PROBLEM: I cannot get the sidebar to work. I have downloaded several other themes to see how they have it set up with home.php, index.php, sidebar.php, functions.php, and other files.

I even activate them instead of mine and it looks wonderful, go back to mine and the two sample posts show on the weblog home page and when you click them the full article opens up, but the sidebar with the widgets does not show.

I even labelled the files to view in inspect element to follow the path, and the files are loading that have get_sidebar() but no sidebar.

What are the basic connectivity settings in any file related to or connected to the sidebar to get it to show?

I have copied and pasted code bits that the themes that are working into my functions and other files, but there must be one last little line I am missing. I know there is a secret not given away. :D

thanks for anyone wanting to help tackle this issue.
- ap

vanukuru.br on "Posts & Pages getting deleted Automatically"

$
0
0

Hello,

All Pages and Posts are getting deleted incrementally (by id) every day and yesterday when we restored back to an old backup, we saw that the entire site is deleted at one go.

We have no clue on how to stop it. Can anyone help us how to resolve it.

Additional Info:
1. This is not a front-end activity, as we have measure to track logins
2. We use Avada theme and its recommended plug-ins
3. In addition we use SEO Ultimate, Redirection, Wordfence, Easy Author Image, Activity Log plug-ins.
4. The deletion is limited to only Pages & Posts.

Website: http://goo.gl/w4uoGY

Any help is really appreciated..!!

Thank You in advance..

Bharath

p.roman on "Programmatically add featured image WITH ALT TEXT to post?"

$
0
0

There a lot of examples of how to attach image to post. But I didn't find how to programmatically add featured image with ALT text to post. Please help.
Thank you.


ava007 on "multiple menu in woocommerce"

$
0
0

I've three categories of products in my woocommerce site. For each category,different menus are provided using menu per page plugin. But in individual product pages the menus cant be assigned and a single menu appearing for all three categories. Please help..

antowordp on "use of tag into wordpress"

$
0
0

Hi i'm trying to upload a svg map to my wordpress website.

I fixed all to be able to upload svg trough the media gallery but then when i try to write the tag into the page it won't recognize it. I can only use it embedding it into a tag... but i can't do that cause i need to work with some svg effect like hover, clicking and so on...

pretty much i would need a way to insert the whole code with the path and so on, into my page... how to do that?

sethbahookey on "Trying to enqueue JS but it's breaking core functions.php"

$
0
0

Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\wamp\www\sites\cc\wp-includes\functions.php on line 4762
Line 4762...

if ( is_null( $overloaded ) )
		$overloaded = function_exists( 'mb_internal_encoding' ) && ( ini_get( 'mbstring.func_overload' ) & 2 );

I created a small JS script to password protect a link on the front-page.php. Keep in mind I know this isn't a secure thing, it's just to discourage users from clicking on a link and sending them to a different part of the site. So I have an ID attached to the <a href> on the front page... Here is the code

jQuery(document).ready(function($) {
	function password_protect() {
	  var password;
	  var pass1="therapist";
	  password = prompt("Password:");
	  if( password==pass1 ) {
	    alert("Correct!");
	  } else {
	    alert('Wrong Password.');
	  }
	}

	$( ".password-protect" ).on( "click", password_protect );
});

Then I enqueue it in my childs folder like so...

add_action( 'wp_enqueue_scripts', 'password_protect_link' );
function password_protect_link() {
	wp_enqueue_scripts( 'password-protect-link', get_stylesheet_directory_uri() . '/js/password-protect-link.js', array('jquery'), '1.0.0', true );
}

So what am I doing wrong here? Is it the JS, the way I enqueued, or something completely different?

ashbydesign on "4.2 category archive query no longer working"

$
0
0

I have a pre_get_posts order set for category archives that has changed on updating to 4.2, now showing default orderby rather than my query. In fact, if I try a different query the same happens - so it's now not applying any query. The categories are all child categories. Categories 3,4,5 and 6 are all children of category 2

function beadnell_archive_log ( $query ) {
if ( !is_admin() && $query->is_main_query() ) {
if ( $query->is_category( array ( '3,4,5,6' ) ) ) {
$query->set( 'order', 'ASC' );
}
}
return $query;
}
add_filter( 'pre_get_posts', 'beadnell_archive_log' );

If anyone has an idea about this - is there something I should be tweaking?

nicolethompson8 on "Create Email Notification function for Gravity Forms Product Add-ons Plugin"

$
0
0

Not having much luck with Woo or Gravity, so thought I'd try here:

I am using the Gravity Forms Product Add-ons plugin for WooCommerce. Woo confirms that the Admin Notification email isn't a feature when the form is used on a product:

"Gravity Forms Add-Ons does not send email notifications when they are assigned to a product." (see FAQs: http://docs.woothemes.com/document/woocommerce-gravity-forms-product-addons/)

While I understand that it seems redundant given the form fields are all included in the WooCommerce email confirmations, the form I'm adding to my products is quite comprehensive and I'd prefer to keep all that messy extra data separate to the WooCommerce order transaction by having the usual Gravity Forms Admin Notification send via email also (I plan to remove the add-on fields from the WooCommerce emails).

Can anyone give me guidance on how to get the usual Gravity Forms Admin Notification email to send even when the form is assigned to a product, please?

Many thanks.

Viewing all 8245 articles
Browse latest View live




Latest Images