Community Forums › Forums › Archived Forums › Design Tips and Tricks › Cornerstone sections and not faking site structure
Tagged: cornerstone, loop
- This topic has 14 replies, 4 voices, and was last updated 10 years, 12 months ago by Terence.
-
AuthorPosts
-
March 27, 2013 at 7:23 pm #31636TerenceMember
Hi,
I want to get rid of the separate blog altogether and integrate all posts using the site's structure to place them in the correct cornerstone sections.
Let me explain what I mean.
I am new to Genesis so I am having difficulties tracking down how the loop works exactly.
The loop is generally started with the following code:
For working with posts, I want to organize this new site's content into "sections" using the Cornerstone plugin [http://wordpress.org/extend/plugins/cornerstone/%5D and not fake the site structure with categories and tags, so I want to use a couple different functions in place of the default ones:
In the loop, displaying the post’s content should be exactly the same as with any other template in a theme. So I assume I can use template tags such as the_title(), the_excerpt(), etc.
Here’s an example loop that displays the title and an excerpt with a link for each post in the section when using Cornerstone...
My questions are ~
A) how is this form of post structuring likely to affect (or not) the loop and other functions within Genesis in general, and more specifically in Dynamik for Genesis?, and
B) where does the loop start in Genesis?
Terence.
March 27, 2013 at 7:34 pm #31639TerenceMemberI seem to have made a bit of cock of my first post. Let me try again.
I want to get rid of the separate blog altogether and integrate all posts using the site's structure to place them in the correct cornerstone sections.
Let me explain what I mean.
I am new to Genesis so I am having difficulties tracking down how the loop works exactly.
The loop is generally started with the following code:
For working with posts, I want to organize this new site's content into "sections" using the Cornerstone plugin [ http://wordpress.org/extend/plugins/cornerstone/%5D and not fake the site structure with categories and tags, so I want to use a couple different functions in place of the default ones:
In the loop, displaying the post’s content should be exactly the same as with any other template in a theme. So I assume I can use template tags such as the_title(), the_excerpt(), etc.
Here’s an example loop that displays the title and an excerpt with a link for each post in the section when using Cornerstone...
My questions are ~
A) how is this form of post structuring likely to affect (or not) the loop and other functions within Genesis in general, and more specifically in Dynamik for Genesis?, and
B) where does the loop start in Genesis?
Terence.
March 27, 2013 at 7:40 pm #31641TerenceMemberI don't understand what's going on. I only used the <code> </code> but its a mess.
Can you help me out here please Mr Mod?
Pretty please.... 8^)
Terence.
March 28, 2013 at 4:11 am #31697TerenceMemberCan I simply use a Dynamik Custom Hook Box with "genesis_loop" to replace the Genesis loop entirely?
Terence.
March 28, 2013 at 6:03 am #31709Brad DaltonParticipantMarch 28, 2013 at 6:59 am #31717TerenceMemberThanks for pointing me in the right direction Brad ~ learning by doing ~ I made a mistake and I learned something.
I'll try again...
Hi,
I want to get rid of the separate blog altogether and integrate all posts using the site's structure to place them in the correct cornerstone sections.
Let me explain what I mean.
I am new to Genesis so I am having difficulties tracking down how the loop works exactly.
The loop is generally started with the following code:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
For working with posts, I want to organize this new site's content into "sections" using the Cornerstone plugin [ http://wordpress.org/extend/plugins/cornerstone/ ] and not fake the site structure with categories and tags, so I want to use a couple different functions in place of the default ones:
<?php if ( cnr_have_children() ) : while ( cnr_have_children() ) : cnr_next_child(); ?>
In the loop, displaying the post’s content should be exactly the same as with any other template in a theme. So I assume I can use template tags such as
the_title(), the_excerpt(),
etc.
Here’s an example loop that displays the title and an excerpt with a link for each post in the section when using Cornerstone...
<?php if ( cnr_have_children() ) : while ( cnr_have_children() ) : cnr_next_child(); ?> <h3><?php the_title(); ?></h3> <div><?php the_excerpt(); ?></div> <?php endwhile; endif; ?>
My questions are ~
A) how is this form of post structuring likely to affect (or not) the loop and other functions within Genesis in general, and more specifically in Dynamik for Genesis?, and
B) where does the loop start in Genesis?
C) Can I simply use, say, a Dynamik Custom Hook Box with “genesis_loop” to replace the Genesis loop entirely and not worry about A) & B) ?
Terence.
March 28, 2013 at 7:29 am #31722Brad DaltonParticipantYou can write your own custom loop for Genesis http://wpsmith.net/2011/genesis/how-to-write-a-genesis-custom-loop-for-specific-categories-in-a-genesis-page-template/
There's a couple more artcoles on this.
March 28, 2013 at 9:49 am #31764TerenceMemberBrad, the code he shows there....
<?php /** * * Template Name: Projects * This file handles blog posts with the category Projects within a page. * */ remove_action('genesis_loop', 'genesis_do_loop'); add_action('genesis_loop', 'custom_do_cat_loop'); function custom_do_cat_loop() { global $query_args; // any wp_query() args $args= array('cat' => '30'); genesis_custom_loop(wp_parse_args($query_args, $args)); } genesis();
looks to me ~ not a developer ~ like it's making an array of categories for the loop, which is not what I am trying to do.
In fact I am trying to avoid using categories and tags for site structure entirely.
Can you help me a little bit further?
Terence.
P.S. But as a result I did find the Display Posts Shortcode plugin, there.
March 28, 2013 at 11:58 am #31803Brad DaltonParticipantHe's written dozens of plugins and works on the Genesis core so i think he's highly regarded in the community.
Not sure how else i can help. I do know there's a few code sbippets for creating your own custom loop.
Bill Erickson has some: http://www.billerickson.net/a-better-and-easier-grid-loop/
http://code.garyjones.co.uk/genesis-grid-loop-advanced
March 29, 2013 at 7:32 am #31908TerenceMemberI am just trying to end up with a site structure that looks something like this...
http://domain.tld/page/post/comments
So I guess my quest continues ~ perhaps with more good intention than common sense.
Thanks anyway, Brad.
April 2, 2013 at 3:35 am #32593Brad DaltonParticipantSorry but i just don't have the answer to your question Terence.
Hopefully someone else can jump in here and help you.
When i do understand how to solve your problem, i will write about it and share the solution.
If you have any other questions, please ask me.
Alwats happy to help.
April 2, 2013 at 1:55 pm #32675Jesse PetersenMemberCurious why you're going to all the trouble to use this plugin to "not fake the site structure with categories and tags" in the first place.
Perhaps if we know why you're doing this and what results that would produce as a result that is different than a normal site with any number of permalink structures, there would be better feedback or solution, but as it stands now, the plugin's purpose looks ridiculous to my sensibilities... and I'm all for good content marketing.
Having cornerstone content is in no way deterred with categories and tags - so to what end is this for?
One of the guys you would want to hang out with.
Preferred StudioPress developer | owner of Petersen Media Group | author of The Golden Rule Way (still writing)April 2, 2013 at 2:15 pm #32684digisavvyMemberI'd have to say that I'm trying to figure out what the end-goal here is, too. It seems like you're spinning your wheels on using 'Sections' to organize your content. The plugin you're using seems to take this concept further, however, I'm not convinced that you need to go this route.
You content could be easily organized using WordPress's built-in Parent/Child Page structure. http://codex.wordpress.org/Pages (read section on creating pages). Doing things this way would get the job done, though, may not provide some of the bells and whistles this Cornerstone plugin purports to yield. Still, I'm not seeing a strong enough benefit in using the plugin.
If you need to move a bunch of posts and make them pages, ptypeconverter is a good tool for that.
As for the loop, there's a lot you can do with it. Below is a very basic example. Very basic, but should, I hope, give you some guidance on the whole thing.
Good luck.
</pre> <pre class="default prettyprint prettyprinted">//Remove the Genesis loop and insertering your own</pre> <pre class="default prettyprint prettyprinted">remove_action('genesis_loop', 'genesis_do_loop');</pre> <pre class="default prettyprint prettyprinted"><em id="__mceDel">add_action('genesis_loop', 'custom_do_cat_loop'); </em></pre> <pre class="default prettyprint prettyprinted">//A basic query. Using WP Query here</pre> <pre class="default prettyprint prettyprinted"><code>$my_query = new WP_Query(array( 'post_type' => array('page'), 'tag' => 'feature' ));</code></pre> <pre class="default prettyprint prettyprinted"> //Some example markup <h1><?php the_title() ?></h1></pre> <pre class=" language-php"><code class=" language-php"> <div class='post-content'><?php the_content() ?></div> </code> genesis();</pre> <pre class="default prettyprint prettyprinted">
April 4, 2013 at 6:51 pm #33226TerenceMember@Jesse_Peterson ~ the simple thought behind the idea is that we are trying to cut down the options of part-time authors and editors to compromise on-page SEO and at the same time take a positive step toward creating a cornerstone content strategy, by forcing all content to appear in one of 6 cornerstone sections on the website. I guess that's it in a nutshell.
April 4, 2013 at 7:01 pm #33230TerenceMember@digisavvy ~ one of our SEO goals is to do away with the blog entirely, and to organize chronologically posted content to be integrated closely with specific keyword based "cornerstone" content pages, which normally cannot be associated with categories or assigned tags.
As for the code, not being a coder, I am very sorry but I don't recognize its value or how to use it.
Could you possibly help me out a little further so that the effort you have obviously gone to isn't wasted?
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.