Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Neutica+ theme homepage edit WordPress

  • SOLVED

I have a tricky theme edit I’d like to make, but I’m not sure if it’s possible.

I am using a [[LINK href="http://fthrwght.com/neuticaplus"]]Neutica+ theme[[/LINK]]. It provides two options for home page display..

Option 1: “Show full posts” [[LINK href="https://img.skitch.com/20111108-df1461ed5t3jeqh3jm8ktxs49h.png"]]CHECKED[[/LINK]], which produces [[LINK href="https://img.skitch.com/20111108-f36kyxfc2x7dktr1c42mjim8tj.png"]]THIS[[/LINK]].
- This is designated by /* Full posts */ in the attached styles.css page.

Option 2: Un-check “show full posts”, which produces snippets of the primary content and a “featured image” thumbnail, and looks like [[LINK href="https://img.skitch.com/20111108-18k3c1hknn7jtbicgxyhd14cij.png"]]THIS[[/LINK]].

I prefer the second option that displays snippets, but would like to eliminate the “featured image” thumbnails and make the snippets span two columns instead of three, so I can embed a soundcloud widget, a couple of lines of text, and a “more” tag on music posts.

[[LINK href="https://img.skitch.com/20111108-n67iq2uigagt7scp21txdpjd9k.png"]]Here’s an attempt[[/LINK]] to show what I mean.

Is this even possible? My styles.css can be viewed [[LINK href="http://pastebin.com/9GF5Pgb0"]]HERE[[/LINK]], and my functions.php code can be viewed [[LINK href="http://pastebin.com/NctRbNF4"]]HERE[[/LINK]]. The site's URL is [[LINK href="http://audiocompulsive.com"]]Audiocompulsive.com[[/LINK]].

Answers (3)

2011-11-07

Kannan C answers:

To remove the thumbnail delete the line of codes in functions.php from line number 604 to 607 and your style.css
line number 199, change

margin-left: 200px to margin-left: 0


Ant Lively comments:

Hi Kannan. That didn't work. Removing 604-607:
<?php if ( has_post_thumbnail() ) { ?>
<div class="entry-thumb-image">
<a href="<?php the_permalink() ?>" rel="bookmark" class="post-image-container"><?php the_post_thumbnail('thumbnail'); ?></a>
</div>


Just crashes the site completely.


Kannan C comments:

sorry, try delete from 604 to 612.


Ant Lively comments:

Hey Kannan,

That got me from three columns down to two! But my goal was to be able to use that space to include html soundcloud widgets, but the ones I have embedded aren't showing up.. Is that just not possible?


Kannan C comments:

you have different sound cloud code for each post, that's right?


Kannan C comments:

i have sent you my skype id. can you come on skype, so i can give you proper information fast. You can edit yourself.


Ant Lively comments:

I am not able to find where you sent your skype id. No "inbox" or "private messages" tab anywhere in this platform. Still looking..


Kannan C comments:

Never mind,
paste this on line number 511 before <?php thematic_content(); ?>
<?php $meta_data = get_post_custom($post->ID); echo $meta_data["scw_code"][0]; ?>
paste this code in the end of your functions.php file

function scw_meta_box(){
add_meta_box("sound-cloud-widget-code", "Sound cloud widget", "scw_meta_options", "post", "normal", "low");
}
function scw_meta_options(){
global $post;
$meta_data = get_post_custom($post->ID);
$scw_code = $meta_data["scw_code"][0];
?>
<p>
<textarea style="width:90%; height: 150px" name="scw_code">
<?php echo $scw_code; ?></textarea>
</p>
<?php
}
add_action("admin_init", "scw_meta_box");
add_action('save_post', 'save_scw_details');

function save_scw_details(){
global $post;
$scw_code = trim($_POST["scw_code"]);
update_post_meta($post->ID, "scw_code", $scw_code);
}

after this, you will see a meta box inside your post editor, there you should paste your widget code.
Reason for this code: As the second option displays the excerpt content and so html will be filtered. So i put a separate box to get the widget code.
My skype is acmeedgn, if you need my help.


Ant Lively comments:

Sorry.. That crashed the site as well. I had a feeling this may bee too tricky on this theme.. I did try to Skype you from user: Antlively.


Kannan C comments:

did you paste the code before the close of the php tag? let me know what's the error you got after pasting the code


Ant Lively comments:

Hi Kannan,

I tried your last suggestion again and did get the Soundcloud widget to show up. But now <em>images</em> that I embed in the html to replace the "featured images" don't show up.

See the new post I put up as an example. In the <em>full</em> post, I inserted a jpg in hopes that it would show up in the sample/snippet on the home page.

I guess what I am saying is that I was hoping to just have those snippet posts on the home page to act like regular "full post" boxes do - allowing embeds, images, etc, without having to add a meta box in the post editor, etc.

I'm assuming at this point it's just not possible to turn that snippet content box into a regular editable html box. Thoughts?


Kannan C comments:

Hi Ant, you can insert whatever html in to the meta box, that can show up in the home page. You can insert your image code just before or after souncloud code so that both image and sound clound widget will show up in front.
You cannot use the regular content editor for this purpose because as you want to show only a few text and some htmls on home, you need some custom filter function which will be complex. Posting through meta box will a simple method if you want you can change that meta box in to a visual editor too.


Ant Lively comments:

Ah.. Great! <em>Amost there</em>..

But [[LINK href="https://img.skitch.com/20111109-qm6m2jepxq879s3wstfwj4e8nu.png
"]]HERE's[[/LINK]] the result I get now with an image. You can see it live now.

I tried adding an <strong>align="left"</strong> to the image, but that gave me [[LINK href="https://img.skitch.com/20111109-jdy16b1hcrm8cm3277kj5dku2a.png"]]THIS[[/LINK]]

Is there any way to achieve [[LINK href="https://img.skitch.com/20111109-kxpxj42ba9w8ytpq9sxd56ep88.png"]]THIS[[/LINK]] when including an image?

Also, that last edit seems to have re-ordered my posts.. So they're no longer in chronological order. You'll notice that the most recent post referenced above is the <em>third</em> one listed.

I copied my the newly edited functions.php code again [[LINK href="http://pastebin.com/c0DdrFYr"]]HERE[[/LINK]] if it helps.


Kannan C comments:

you can add this class(alignleft) to the img tag. ex:

<img src="pathtoyourimage" class="alignleft" alt="" />

And i did not written any post queries so my code cannot re-order the posts. I think there is something else causing it.


Kannan C comments:

also put display property for entry-content class on line 199, so img alignleft will work

.entry-content {
clear: left;
display: table;//now added
margin-left: 0;
margin-right: 200px;
padding: 0 10px 0 5px;
}


Ant Lively comments:

Brilliant! Thank you so much for all of your help with this.. I didn't think it was going to be possible but it looks great.

One LAST question! Is there any way for me to include 10px of space between the soundcloud meta content and where the text begins? Like [[LINK href="https://img.skitch.com/20111109-kypw8dd3rm5445stfa8t5yhshy.png"]]THIS[[/LINK]]?


Kannan C comments:

i saw your adding a div when inserting the soundcloud iframe code. Add margin space to it, like

<div style="margin-bottom:10px">
//souncloud code
</div>

you can also put a class to the div and define that class styles in your style.css

And don't forget to vote up.


Ant Lively comments:

Again, I can't thank you enough! I hope you don't mind me giving $5 of the $50 to Duncan, to honor his time in trying to find a solution as well..

Cheers!


Ant Lively comments:

Oops.. I hate to tell you this, but I began to update the rest of my posts.. And for some reason when I put the soundcloud code into the sixth post "Swarms", it causes all kinds of issues that are live right now. It wiped out my sidebar and cut off the bottom of the page.

I'll go back and award another $10 if there's a quick fix you can suggest. (Or more if necessary)

Here's the code I have in the soundcloud meta box:

<div style="margin-bottom:10px"><iframe src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11895814&auto_play=false&show_artwork=true&color=007098" frameborder="no" scrolling="no" width="100%" height="166"></div>

2011-11-08

Duncan O'Neill answers:

Hi Ant,

you should be able to solve this with a couple of css changes, and may possibly need a tweak to functions.php in your neuticaplus folder.

Following are the css changes, to go at the bottom of style.css in the neuticaplus folder;


.home .entry-thumb-image {display:none;}
.home .post .entry-content {margin-left:0;}


Note that the above may change according to what you have set as your home or blog page. Depending on those options, you may have to replace .home above with .blog, or *add* these rules as well;


.blog .entry-thumb-image {display:none;}
.blog .post .entry-content {margin-left:0;}


You may also want to make a change to the amount of text each 'snippet' contains. You can do that on around 424 of functions.php in your neuticaplus folder. Look for these lines;


function neutica_excerpt_length($length) {


beneath that string are the two numbers for how many words are returned in the 'snippet'. The first figure is for search, archive, and category pages, the second for other pages.

hope this helps,


Ant Lively comments:

Hi Duncan,

This fix eliminates the "featured image" column successfully, but the snippet posts still don't allow me to embed widgets, images, etc. Just text.

Kannan's fix above created a meta box in my post editor that allows me to embed a soundcloud widget for music posts, but I was hoping to be able to include images on non-music posts.

I just want to be able to have a regular HTML box that would allow me to embed widgets, images, video, or text. But I'm beginning to think it just isn't possible here..

2011-11-07

Luis Cordova answers:

please message me with login details this is totally possible, I have done similar things in soundsanalytical.com thanks


Luis Cordova comments:

send them via private message


Luis Cordova comments:

ok working on it


Ant Lively comments:

Not sure if this reply will be a private message, but my functions.php page is attached here. Styles.css coming next..


Ant Lively comments:

Sorry, I don't know how to send a private messages here that I can attach files to..


Luis Cordova comments:

click on my name then send message button right below my name


Luis Cordova comments:

got it, ok


Luis Cordova comments:

careful with breaking your theme, a better way is to let someone go in and be careful. Please let me know.