• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Help with coding Magazine pro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Help with coding Magazine pro

This topic is: resolved

Tagged: Magazine Pro php header image

  • This topic has 13 replies, 2 voices, and was last updated 12 years, 1 month ago by jourdain.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • May 2, 2014 at 12:58 pm #103356
    jourdain
    Member

    Hi Guys and Girls, I have a couple of questions that I hope you guys can help me with.

    A little about me, I am familiar with html and css and have created a few sites. On the other hand I am not that good with php (I'm working on it)

    Link To site: http://creativefreaks.co.uk/

    So here is what I would like to do:

    Firstly I would would like to remove the site title (creative Freaks) and replace it with a static image that is centralised. This will be my logo.

    Secondly I was wondering if there was a way I could add a featured article to the content archives pages similar to the homepage. I would also like to be able to set the article to what i like and not just the most recent post.

    If you could point me in the write direction or know how this could be achieved then any help is appreciated.

    Thanks to all replies in advance

    Jourdain

    http://creativefreaks.co.uk/
    May 2, 2014 at 9:30 pm #103387
    Brad Dalton
    Participant

    1. Go to Appearance > Header and upload your logo.

    You can change the dimensions in your style sheet under the Site Header section.

    2. You can hook in a new widget area into any archive

    Change the conditional tag from is_front_page() to is_archive(archive-slug)


    Tutorials for StudioPress Themes.

    May 3, 2014 at 3:11 am #103425
    jourdain
    Member

    I can't believe I missed that header option in the settings! Thanks for that.

    I have hooked a new widget are into the archive page ( http://creativefreaks.co.uk/category/inspiration ) but I have a few questions before I proceed.

    1. Does the widget need to styled or should it take on the themes styling? I just want to make sure I have not made a mistake.

    2. I was hoping to have a different featured post for each archive category, is this possible?

    3. Can the widget be removed when the user clicks through to page 2 of the archive?

    If you could point me the write direction and I will learn/teach myself.

    Thanks again

    Jourdain

    May 3, 2014 at 4:14 am #103428
    jourdain
    Member

    I have worked out question number 2.

    I have used ( is_category( 'tutorials' ) in order to display on a single category page. Then I will just hook a new widget in for each category page. Does this sound ok?

    Jourdain

    May 3, 2014 at 4:16 am #103429
    Brad Dalton
    Participant

    1. You would style it depending on what you populate it with. You could grab the classes from an existing widget in your functions file and use the same classes in your custom widget.

    'before' => '<div class="after-entry">',
    

    2. Try the Genesis Featured Posts Widget.

    3. You can control the widget so it only displays on the first page of the archive by using:

    (i) A conditional tag after the function

    is_paged()

    https://codex.wordpress.org/Conditional_Tags#A_Paged_Page

    (ii) Or a query variable

    get_query_var('paged') == 1) 

    http://codex.wordpress.org/Function_Reference/get_query_var


    Tutorials for StudioPress Themes.

    May 3, 2014 at 12:10 pm #103476
    jourdain
    Member

    Again thanks for your help, I have one other question about the formatting.

    I would like to style the widget in the same way the home page is styled with the sidebar in line with the featured post widget. Is there anything I need to consider in order to achieve this?

    Jourdain

    May 3, 2014 at 1:58 pm #103485
    Brad Dalton
    Participant

    The hook position and use the dame class as the widget on the home page.

    Any of these hooks

    genesis_before_loop
    genesis_loop
    loop_start
    genesis_before_entry
    

    In reply to this

    Absolutely. Rinse and repeat as they say but do change both instances of the function name in the code.


    Tutorials for StudioPress Themes.

    May 4, 2014 at 7:31 am #103576
    jourdain
    Member

    I am having trouble adding a conditional tag after the function.

    I have tried adding the is_paged code in many ways using tutorials and WordPress codex you linked but each time I break break my site. So I am defiantly doing something wrong.

    This is what the code currently looks like for your reference.

    genesis_register_sidebar( array(
    	'id'          => 'new-widget',
    	'name'        => __( 'Featured Tutorials', 'domain' ),
    	'description' => __( 'Add Content Here', 'domain' ),
    ) );
     
    add_action( 'genesis_before_loop', 'your_widget' );
    
    function your_widget() {
    if ( is_category( 'tutorials' ) && is_active_sidebar('new-widget') ) {
    
    genesis_widget_area( 'new-widget', array(
    'before' => '<div class="home-top widget-area">',
    'after'	 => '</div>',
    		
    ) ); 
     
      }
     

    Link: http://creativefreaks.co.uk/category/tutorials

    Secondly, the widget title styling did not transfer over. I was wondering if I need to add something to the code for that to be pulled? I can change it with css but I am just curious.

    Jourdain

    May 4, 2014 at 3:12 pm #103622
    Brad Dalton
    Participant

    You need to add another closing curly bracket at the end of the code as you have add an opening one at the end of the line which includes the conditional tag.

    You can change the home-top class in the code or style each widget differently using CSS


    Tutorials for StudioPress Themes.

    May 4, 2014 at 5:02 pm #103629
    jourdain
    Member

    I am stumped with this one, sorry for being a total newb but I cant figure it out.

    her is the code.

    genesis_register_sidebar( array(
    	'id'          => 'new-widget',
    	'name'        => __( 'Featured Tutorials', 'domain' ),
    	'description' => __( 'Add Content Here', 'domain' ),
    ) );
     
    add_action( 'genesis_before_loop', 'your_widget' );
    
    function your_widget() {
    if ( is_category( 'tutorials' ) && is_active_sidebar('new-widget') ) {
    if ( is_paged() ) { 	}
     
    genesis_widget_area( 'new-widget', array(
    'before' => '<div class="home-top widget-area">',
    'after'	 => '</div>',
    		
    ) ); 
     
      }
     
    }

    What else needs to be added to the code so the widget is only displayed on the 1 page of the archive.

    Thanks in advance.

    May 4, 2014 at 5:29 pm #103630
    Brad Dalton
    Participant

    Remove this:

    if ( is_paged() ) { 	}
    

    If you want to add another conditional, add it like this:

    if ( is_category( '007' ) && is_active_sidebar('new-widget') && is_paged() ) {
    

    Or like this:

    if ( is_category( '007' ) && is_active_sidebar('new-widget') || is_paged() ) {
    

    Change 007 to the tutorials category i.d


    Tutorials for StudioPress Themes.

    May 5, 2014 at 3:56 am #103683
    jourdain
    Member

    I added the code in like you said and it now looks like this

    if ( is_category( 'tutorials' ) && is_active_sidebar('new-widget') && is_paged( '') ) {

    The only problem is that it has had the reverse affect. I would like the widget to only appear on page 1 and not subsequent pages. However, at the moment it does not appear on page 1, but does appear on pages 2, 3, 4, 5 ...

    Is there a way to fix that?

    Link to tutorials page: http://creativefreaks.co.uk/category/tutorials

    May 5, 2014 at 2:30 pm #103745
    Brad Dalton
    Participant

    Change this:

    is_paged( '')
    

    To this:

    ! is_paged()
    

    Tutorials for StudioPress Themes.

    May 5, 2014 at 2:48 pm #103750
    jourdain
    Member

    AMAZING!!!

    Thanks for your help and patience buddy, it is working correctly now.

    Jourdain

  • Author
    Posts
Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble