Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8031861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:13:54+00:00 2026-06-05T01:13:54+00:00

I just started to do some WordPress Theme Coding. I would like to integrate

  • 0

I just started to do some WordPress Theme Coding.

I would like to integrate a feature in my theme which integrates another element depending on the length of my page entry (content).

The Idea was to say

if( div with content >= 310 px ) {
  <div id="">
  </div>
}

Is there a way to do that?

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:13:55+00:00Added an answer on June 5, 2026 at 1:13 am

    If you have jQuery integrated you can just use

    $('#div_to_check').height(); 
    

    or for the whole document

    $(document).height();
    

    similar to

    <script> 
        if( $('#div_to_check').height() >= 310) {    
            document.write('<div id=""></div>');
        }
    </script>
    

    Because the content of your page will most likely be variable, you’ll need to check the height after the page finishes loading, so I’d definitely do this via Javascript and not attempt it with PHP.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just started my first WCF rest project and would like some help on what
I just started with WPF and would like some advice with the following: I
I had just started working on some automated testing tools, namely test complete, which
I just started with Python, Is there some iteration in dictionary like in PHP
I just started learning some ruby, and I want to do something like this:
I just started a coding related wordpress bog to basicly discuss topics and store
I've just started doing some work with Google Closure, and I'd like to move
I just started reading, and go through some knokout tutorial, and really like it,
We've just started getting some errors when trying to publish pages (.NET) - in
I've just started doing some real-world performance testing on my Fluent NHibernate / SQLite

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.